From 73dd7371d0172152bcf76f8bc30ac5eefdd28df0 Mon Sep 17 00:00:00 2001 From: danzel Date: Fri, 21 Dec 2012 14:40:09 +1300 Subject: [PATCH] Change marker click tracking. Only care if the map has been dragged if we are not draggable. If we are draggable and we get a possible click then we don't need to care if the map was dragged as we would have been handling the drag. Fixes #1223 --- src/layer/marker/Marker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layer/marker/Marker.js b/src/layer/marker/Marker.js index ac63544d..2c3a76a8 100644 --- a/src/layer/marker/Marker.js +++ b/src/layer/marker/Marker.js @@ -218,7 +218,7 @@ L.Marker = L.Class.extend({ if (wasDragged) { return; } - if (this._map.dragging && this._map.dragging.moved()) { return; } + if ((!this.dragging || !this.dragging._enabled) && this._map.dragging && this._map.dragging.moved()) { return; } this.fire(e.type, { originalEvent: e