Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit/delete handler bug. #247

Merged
merged 4 commits into from
Dec 19, 2013
Merged

Edit/delete handler bug. #247

merged 4 commits into from
Dec 19, 2013

Conversation

manubb
Copy link
Contributor

@manubb manubb commented Dec 18, 2013

First commit:
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.

Second commit:
-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.

Manuel Baclet added 2 commits December 18, 2013 17:32
when another handler is clicked on.
Add draw:deletestart and draw:deletestop events.
@jacobtoye
Copy link
Member

Awesome!

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants