diff --git a/src/dom/Draggable.js b/src/dom/Draggable.js index c743c11c..2a6e9ff7 100644 --- a/src/dom/Draggable.js +++ b/src/dom/Draggable.js @@ -49,7 +49,7 @@ L.Draggable = L.Evented.extend({ L.DomEvent.stopPropagation(e); - if (L.Draggable._disabled) { return; } + if (L.DomUtil.hasClass(this._element, 'leaflet-zoom-anim')) { return; } L.DomUtil.disableImageDrag(); L.DomUtil.disableTextSelection(); diff --git a/src/map/anim/Map.ZoomAnimation.js b/src/map/anim/Map.ZoomAnimation.js index eeaeeaad..085b2663 100644 --- a/src/map/anim/Map.ZoomAnimation.js +++ b/src/map/anim/Map.ZoomAnimation.js @@ -89,11 +89,6 @@ L.Map.include(!zoomAnimated ? {} : { this._animateToCenter = center; this._animateToZoom = zoom; - // disable any dragging during animation - if (L.Draggable) { - L.Draggable._disabled = true; - } - L.DomUtil.addClass(this._mapPane, 'leaflet-zoom-anim'); } @@ -113,9 +108,5 @@ L.Map.include(!zoomAnimated ? {} : { L.DomUtil.removeClass(this._mapPane, 'leaflet-zoom-anim'); this._resetView(this._animateToCenter, this._animateToZoom, true, true); - - if (L.Draggable) { - L.Draggable._disabled = false; - } } });