-
Notifications
You must be signed in to change notification settings - Fork 762
Description
Currently, the vertexremoved event contains the feature, vertex, and pixel of the removed vertex. This information is not sufficient to determine where the vertex that was removed "was" in the parent geometry. We need to know the position within the parent geometry that the vertex occupied prior to it being removed. The point is removed before the event is fired, so there is now way to interrogate the data to determine the position.
I see three options to provide this functionality:
- Fire the event before the vertex is removed.
- Fire a new event "beforevertexremoved".
- Add the old index to the current event.
Option #1 is not acceptable since many applications may depend on the current event being fired after the removal.
Option #2 seems to be less risky, but adds another event that is probably hyper-specific to this scenario, and could muddy the API.
Option #3 is a good options since it does not affect the current API and is backwards compatible. It can also be implemented in about 3 lines of code.
I plan on submitting a pull request implementing Option #3 for community review.