[OpenLayers-Trac] [OpenLayers] #3016: ModifyFeature - "del" key press outside feature should delete it

OpenLayers trac-20090302 at openlayers.org
Tue Jan 18 09:34:57 EST 2011


#3016: ModifyFeature - "del" key press outside feature should delete it
-----------------------------------+----------------------------------------
 Reporter:  adube                  |       Owner:  tschaub     
     Type:  feature                |      Status:  new         
 Priority:  minor                  |   Milestone:  2.11 Release
Component:  Control.ModifyFeature  |     Version:  2.10        
 Keywords:  del, delete, key       |       State:              
-----------------------------------+----------------------------------------
 '''New functionality'''

 Being able to delete the currently selected feature with the ModifyFeature
 control on "del" key press when the mouse is not over a vertice.

 '''Current behavior'''

 While a feature is selected, when the "del" key is pressed when hovering a
 vertice, it deletes it.  When done while hovering anything else, it does
 nothing.

 '''Proposed change'''

 While a feature is selected, pressing the "del" key while not hovering a
 vertice should delete the whole feature.  It would triggers new
 "beforefeaturedeleted" and "featuredeleted" events when doing so in order
 for users to be able to display custom confirmation messages before doing
 so (done on "beforefeaturedeleted" event).  The default behavior would be
 to delete the feature if no event is registered.

 If the feature has a fid, it would be put to "Delete" state, else it would
 simply be removed and destroyed from the layer.


 '''Changes to API, side effects...'''

 No backward incompatibility changes to the API, but that new feature
 clearly changes the behavior of the control.  If we don't want to break
 the original behavior, we could have a flag option to enable/disable that
 new feature that would be 'false' by default.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3016>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list