Dragging a marker should not make a map click event.
This commit is contained in:
parent
df7c350c75
commit
c03ff65bc4
@ -203,10 +203,11 @@ L.Marker = L.Class.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onMouseClick: function (e) {
|
_onMouseClick: function (e) {
|
||||||
if (this.hasEventListeners(e.type)) {
|
var wasDragged = this.dragging && this.dragging.moved();
|
||||||
|
if (this.hasEventListeners(e.type) || wasDragged) {
|
||||||
L.DomEvent.stopPropagation(e);
|
L.DomEvent.stopPropagation(e);
|
||||||
}
|
}
|
||||||
if (this.dragging && this.dragging.moved()) { return; }
|
if (wasDragged) { 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, {
|
||||||
originalEvent: e
|
originalEvent: e
|
||||||
|
Loading…
Reference in New Issue
Block a user