From 895a75de4872a58561002bc182f2aa538b134149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20S=C3=A1nchez=20Ortega?= Date: Thu, 30 Jul 2015 10:33:57 +0200 Subject: [PATCH] Do not set draggable flags during a zoom animation --- src/dom/Draggable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dom/Draggable.js b/src/dom/Draggable.js index 073a7354..48644e4d 100644 --- a/src/dom/Draggable.js +++ b/src/dom/Draggable.js @@ -46,6 +46,8 @@ L.Draggable = L.Evented.extend({ _onDown: function (e) { 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; } L.Draggable._dragging = true; // Prevent dragging multiple objects at once. @@ -53,8 +55,6 @@ L.Draggable = L.Evented.extend({ L.DomUtil.preventOutline(this._element); } - if (L.DomUtil.hasClass(this._element, 'leaflet-zoom-anim')) { return; } - L.DomUtil.disableImageDrag(); L.DomUtil.disableTextSelection();