commit
34ce6e6eba
@ -99,6 +99,10 @@ L.Draggable = L.Class.extend({
|
||||
L.DomEvent
|
||||
.on(document, L.Draggable.MOVE[e.type], this._onMove, this)
|
||||
.on(document, L.Draggable.END[e.type], this._onUp, this);
|
||||
|
||||
if (e.type === 'mousedown') {
|
||||
L.DomEvent.on(document, 'mouseout', this._onUp, this);
|
||||
}
|
||||
},
|
||||
|
||||
_onMove: function (e) {
|
||||
@ -169,6 +173,8 @@ L.Draggable = L.Class.extend({
|
||||
.off(document, L.Draggable.END[i], this._onUp);
|
||||
}
|
||||
|
||||
L.DomEvent.off(document, 'mouseout', this._onUp);
|
||||
|
||||
if (this._moved) {
|
||||
// ensure drag is not fired after dragend
|
||||
L.Util.cancelAnimFrame(this._animRequest);
|
||||
|
Loading…
Reference in New Issue
Block a user