Fixed regression in Draggable (click triggers after dragging), closed #306
This commit is contained in:
parent
106054140b
commit
fe443d3d50
@ -43,7 +43,8 @@ L.Draggable = L.Class.extend({
|
||||
el.className += ' leaflet-active';
|
||||
}
|
||||
|
||||
if (this._moved) { return; }
|
||||
this._moved = false;
|
||||
if (this._moving) { return; }
|
||||
|
||||
if (!L.Browser.touch) {
|
||||
L.DomUtil.disableTextSelection();
|
||||
@ -68,6 +69,7 @@ L.Draggable = L.Class.extend({
|
||||
this.fire('dragstart');
|
||||
this._moved = true;
|
||||
}
|
||||
this._moving = true;
|
||||
|
||||
var newPoint = new L.Point(first.clientX, first.clientY);
|
||||
this._newPos = this._startPos.add(newPoint).subtract(this._startPoint);
|
||||
@ -106,8 +108,8 @@ L.Draggable = L.Class.extend({
|
||||
|
||||
if (this._moved) {
|
||||
this.fire('dragend');
|
||||
this._moved = false;
|
||||
}
|
||||
this._moving = false;
|
||||
},
|
||||
|
||||
_setMovingCursor: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user