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
This commit is contained in:
danzel 2012-12-21 14:40:09 +13:00
parent 2a0eec9ce7
commit 73dd7371d0

View File

@ -218,7 +218,7 @@ L.Marker = L.Class.extend({
if (wasDragged) { return; } 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, { this.fire(e.type, {
originalEvent: e originalEvent: e