Merge pull request #1033 from danzel/fix-events

Allow click events to propogate through
This commit is contained in:
Vladimir Agafonkin 2012-10-05 08:11:34 -07:00
commit 85d350e322
2 changed files with 6 additions and 2 deletions

View File

@ -187,7 +187,9 @@ L.Marker = L.Class.extend({
}, },
_onMouseClick: function (e) { _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.dragging && this.dragging.moved()) { return; }
if (this._map.dragging && this._map.dragging.moved()) { return; } if (this._map.dragging && this._map.dragging.moved()) { return; }
this.fire(e.type, { this.fire(e.type, {

View File

@ -113,7 +113,9 @@ L.Path = L.Path.extend({
this._fireMouseEvent(e); this._fireMouseEvent(e);
L.DomEvent.stopPropagation(e); if (this.hasEventListeners(e.type)) {
L.DomEvent.stopPropagation(e);
}
}, },
_fireMouseEvent: function (e) { _fireMouseEvent: function (e) {