diff --git a/src/map/anim/Map.PanAnimation.js b/src/map/anim/Map.PanAnimation.js index 8de67e3c..9b20aef6 100644 --- a/src/map/anim/Map.PanAnimation.js +++ b/src/map/anim/Map.PanAnimation.js @@ -10,9 +10,7 @@ L.Map.include({ center = this._limitCenter(L.latLng(center), zoom, this.options.maxBounds); options = options || {}; - if (this._panAnim) { - this._panAnim.stop(); - } + this.stop(); if (this._loaded && !options.reset && options !== true) { diff --git a/src/map/handler/Map.Drag.js b/src/map/handler/Map.Drag.js index 45cb717d..b3281e26 100644 --- a/src/map/handler/Map.Drag.js +++ b/src/map/handler/Map.Drag.js @@ -48,9 +48,7 @@ L.Map.Drag = L.Handler.extend({ }, _onDown: function () { - if (this._map._panAnim) { - this._map._panAnim.stop(); - } + this._map.stop(); }, _onDragStart: function () { diff --git a/src/map/handler/Map.TouchZoom.js b/src/map/handler/Map.TouchZoom.js index 32e9d915..49120ddc 100644 --- a/src/map/handler/Map.TouchZoom.js +++ b/src/map/handler/Map.TouchZoom.js @@ -33,9 +33,7 @@ L.Map.TouchZoom = L.Handler.extend({ this._centerOffset = viewCenter.subtract(this._startCenter); - if (map._panAnim) { - map._panAnim.stop(); - } + map.stop(); L.DomEvent .on(document, 'touchmove', this._onTouchMove, this)