Merge pull request #3692 from Leaflet/dragging-while-zooming
Do not set draggable flags during a zoom animation
This commit is contained in:
commit
5a29499834
@ -46,6 +46,8 @@ L.Draggable = L.Evented.extend({
|
|||||||
_onDown: function (e) {
|
_onDown: function (e) {
|
||||||
this._moved = false;
|
this._moved = false;
|
||||||
|
|
||||||
|
if (L.DomUtil.hasClass(this._element, 'leaflet-zoom-anim')) { return; }
|
||||||
|
|
||||||
if (L.Draggable._dragging || e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches) || !this._enabled) { return; }
|
if (L.Draggable._dragging || e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches) || !this._enabled) { return; }
|
||||||
L.Draggable._dragging = true; // Prevent dragging multiple objects at once.
|
L.Draggable._dragging = true; // Prevent dragging multiple objects at once.
|
||||||
|
|
||||||
@ -53,8 +55,6 @@ L.Draggable = L.Evented.extend({
|
|||||||
L.DomUtil.preventOutline(this._element);
|
L.DomUtil.preventOutline(this._element);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (L.DomUtil.hasClass(this._element, 'leaflet-zoom-anim')) { return; }
|
|
||||||
|
|
||||||
L.DomUtil.disableImageDrag();
|
L.DomUtil.disableImageDrag();
|
||||||
L.DomUtil.disableTextSelection();
|
L.DomUtil.disableTextSelection();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user