When in edit/delete mode, revertLayers has to be called when another handler is clicked on.
To reproduce in http://leaflet.github.io/Leaflet.draw/
-Draw two markers
-Delete one but do not click save/cancel
-Click edit button.
The marker is deleted even though the change was not saved.
-draw:deletestart and draw:deletestop are fired in delete handler instead of draw:editstart and draw:editstop.
-enable and disable functions are reshaped so that a handler cannot be activated while the other is still active.
This is useful when drawLayer has to be updated in some way when entering delete mode and in another way when entering edit mode.
When in edit/delete mode, revertLayers has to be called
when another handler is clicked on.
Reorder code that enable/disable edt/delete handlers.
Add draw:deletestart and draw:deletestop events.
One small issue, could you please pull in the Leaflet.draw upstream to get all changes in the last 3 months so this PR can be automatically merged. There might be conflicts since you fork is out of date.
Merge remote-tracking branch 'upstream/master'
Extend changes to enable/disable in Draw.Feature.js.