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

Allow click events to propogate through #1033

Merged
merged 3 commits into from
Oct 5, 2012
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Allow click events on Marker elements to fall through if they are not…
… handled.
  • Loading branch information
danzel committed Oct 3, 2012
commit f4352173013a3f8ec37f369a4a275a45939c8bac
4 changes: 3 additions & 1 deletion src/layer/marker/Marker.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ L.Marker = L.Class.extend({
},

_onMouseClick: function (e) {
L.DomEvent.stopPropagation(e);
if (this.hasEventListeners(e.type)) {
L.DomEvent.stopPropagation(e);
}
if (this.dragging && this.dragging.moved()) { return; }
if (this._map.dragging && this._map.dragging.moved()) { return; }
this.fire(e.type, {
Expand Down