[OpenLayers-Trac] Re: [OpenLayers] #3016: ModifyFeature - "del" key
press outside vertice should delete the feature
OpenLayers
trac-20090302 at openlayers.org
Wed May 11 03:24:06 EDT 2011
#3016: ModifyFeature - "del" key press outside vertice should delete the feature
-----------------------------------+----------------------------------------
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: Review
-----------------------------------+----------------------------------------
Comment(by erilem):
In [attachment:patch-openlayers-3016-r11965-A4.diff] I've reworked the
tests a bit. I've also added information in the featurestatechanged event
doc text, removed {{{this.prevState = null}}} in the {{{Feature.Vector}}}
constructor, and changed the names of the properties in the event
({{{state}}} -> {{{newState}}}, {{{previous}}} -> {{{prevState}}}). Tell
me what you think.
Also, without your patch {{{toState}}} does nothing when {{{state}}} is
{{{DELETE}}} and {{{this.state}}} is {{{INSERT}}}; with your patch
{{{toState}}} does set the feature state to {{{DELETE}}} in that case. I
guess you've purposefully changed that behavior, for a
{{{featurestatechanged}}} event to be triggered in that case. I think it's
fine, but the application code will need to behave correctly in that case,
by destroying the feature right away. Do you agree?
--
Ticket URL: <http://trac.openlayers.org/ticket/3016#comment:16>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list