Make "add marker" button draggable #213

Open
Zverik opened this Issue Nov 8, 2013 · 2 comments

Projects

None yet

3 participants

@Zverik
Contributor
Zverik commented Nov 8, 2013

Jochen Topf told me has kept trying to drag a marker button for adding a marker. While this is obviously wrong, why not make it an option? E.g. if options.markerButtonDraggable is set, one can either press a button (standard behaviour) or drag and drop it on a map. The moment the button is dragged, a marker is created, and will be added to the map when a mouse button is released.

@jacobtoye
Member

This is a cool idea ;)

@codePitcher

I have a situation where user "drag" the adding marker button by mistake to outside of the current browser window, please dont ask me why! But I was looking into adding a listener to ondragstart event and simply returing false; . This would work albeit very very crude.

Is there an option in leaflet.draw to do this, prevent the add marker button itself being dragged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment