Skip to content
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.

Click event when dragging from label #143

Open
a1an77 opened this issue Feb 15, 2016 · 2 comments
Open

Click event when dragging from label #143

a1an77 opened this issue Feb 15, 2016 · 2 comments

Comments

@a1an77
Copy link

a1an77 commented Feb 15, 2016

When a label has a click event on it, the event is fired in case a drag action is performed starting on the label. See http://jsfiddle.net/A1an/mqL7h6p5/
If the map is dragged so that the label gets out of it, the event is not fired any more.

I would expect the clickable label to detect a drag and avoid firing a click event in that case. Any idea how to solve it?

@a1an77
Copy link
Author

a1an77 commented Feb 17, 2016

Using a divIcon, the behavior on drag is as expected: http://jsfiddle.net/A1an/3rfwf6au/1/ so it really seems an issue of the Label plugin

@a1an77
Copy link
Author

a1an77 commented Feb 26, 2016

It seems to have something to do with the _fireMouseEvent function on line 234 (Label.js) where 'mousedown' is treated specially. Looking at the divIcon code and its parents Icon and Class I could find no event handling at all... where is that defined?

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

No branches or pull requests

1 participant