Patch for ModifyFeature control of OpenLayers.
Extends the ModifyFeature control behavior to allow delete by del-key the feature that have been selected for modification.
OpenLayers. | Patch for ModifyFeature control of OpenLayers. |
Properties | |
deleteKeyMode | {String} Mode in which the del-key acts to remove the feature that is selected for modification. |
deferDelete | {Boolean} Instead of removing features from the layer, set feature states of deleted features to DELETE. |
Functions | |
handleKeypress | Called by the feature handler on keypress. |
justUnselectFeature | Called to unselect the feature. |
{String} Mode in which the del-key acts to remove the feature that is selected for modification. The available modes are: “none”, “always”, “bounds” (only be deleted if when pressing del-key the mouse is within the feature bounds) and “hover” (only be deleted pressing del-key when the mouse is placed over the feature)
{Boolean} Instead of removing features from the layer, set feature states of deleted features to DELETE. This assumes a save strategy or other component is in charge of removing features from the layer. Default is false. If false, deleted features will be immediately removed from the layer.
_prototype.handleKeypress = function( evt )
Called by the feature handler on keypress. This is used to delete vertices. If the <deleteCode> property is set, vertices will be deleted when a feature is selected for modification and the mouse is over a vertex.
evt | {Event} Keypress event. |
Called by the feature handler on keypress.
_prototype.handleKeypress = function( evt )
Called to unselect the feature.
_prototype.justUnselectFeature = function( feature )