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

prevent undefined property from removing all click events when removed from map #4113

Merged
merged 2 commits into from
Dec 31, 2015

Conversation

robertleeplummerjr
Copy link

If a class does not have a click event, and it is removed, it causes all click events to be removed from map. This prevents that from happening.

@robertleeplummerjr
Copy link
Author

@mourner That was the fastest I've ever seen someone interact with a pull request. Are you sure you are a human? 👍

@robertleeplummerjr
Copy link
Author

The other way to solve this is to properly set the option, or: L.Class.prototype._onClick = function () { };. The most logical for stability seemed like what was included in the pr.

mourner added a commit that referenced this pull request Dec 31, 2015
prevent undefined property from removing all click events when removed from map
@mourner mourner merged commit 3543fc6 into Leaflet:stable Dec 31, 2015
@mourner
Copy link
Member

mourner commented Dec 31, 2015

Thanks! Actually that label was added by a bot (waffle.io). I'm mostly off for holidays. :)

@robertleeplummerjr
Copy link
Author

👍

@robertleeplummerjr
Copy link
Author

Also, waffle.io rocks.

@z0mt3c
Copy link

z0mt3c commented Jan 15, 2016

Actually i think this change/merge is not correct. According to robertleeplummerjr@3cec7fc i would suggest it should just be renamed to _fireMouseEvent? Your proposed change will allow you to register handlers but will not de-register the listener on removal.

@mourner please have another look... i guess this one shouldn't have passed its review.

@robertleeplummerjr
Copy link
Author

The origin: 3cec7fc of the above. @z0mt3c You use "it" a few times here, can you clarify which forks/revisions/libraries you are referring to when you mention them above?

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.

3 participants