Enables unselecting selected features by clicking outside any feature. This is the default mode of the modify feature control. If you want to use the old mode where a click on a selected feature unselects that feature, set the toggle option to true. If you really want the old mode and not have selected features be unselected when clicking outside any feature, set the clickout option to false. The patch also adds the properties toggleKey and multipleKey to the modify feature control. With these one can temporarily enable the toggle and multiple mode, respectively. See the select-feature.html example to see all this in action. Thanks to pvalsecc and tschaub for the great colloration on this. (closes #1137)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@5506 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2007-12-19 11:09:44 +00:00
parent 65ad59a277
commit 6fb48c0cd7
7 changed files with 384 additions and 211 deletions

View File

@@ -197,7 +197,7 @@ OpenLayers.Handler = OpenLayers.Class({
* the callback (defined by the control).
*/
callback: function (name, args) {
if (this.callbacks[name]) {
if (name && this.callbacks[name]) {
this.callbacks[name].apply(this.control, args);
}
},