Merge pull request #3015 from Leaflet/2930

stopPropagation of click event following drag operation (fixes #2930)
This commit is contained in:
Vladimir Agafonkin 2014-11-12 10:29:19 +02:00
commit 8cc14fbd6f

View File

@ -581,7 +581,10 @@ L.Map = L.Evented.extend({
if (type === 'click') {
var draggableObj = obj.options.draggable === true ? obj : this;
if (!e._simulated && ((draggableObj.dragging && draggableObj.dragging.moved()) ||
(this.boxZoom && this.boxZoom.moved()))) { return; }
(this.boxZoom && this.boxZoom.moved()))) {
L.DomEvent.stopPropagation(e);
return;
}
obj.fire('preclick');
}