From b42500b48a6d97c22f5474cfaeb7d96fed16dad6 Mon Sep 17 00:00:00 2001 From: Dave Leaver Date: Thu, 20 Mar 2014 13:05:06 +1300 Subject: [PATCH] Only stop the pan animation within pan animation. If there is a zoom animation going on we don't want to stop it. Otherwise big mouse wheel zooms are broken. --- src/map/anim/Map.PanAnimation.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/map/anim/Map.PanAnimation.js b/src/map/anim/Map.PanAnimation.js index 9b20aef6..8de67e3c 100644 --- a/src/map/anim/Map.PanAnimation.js +++ b/src/map/anim/Map.PanAnimation.js @@ -10,7 +10,9 @@ L.Map.include({ center = this._limitCenter(L.latLng(center), zoom, this.options.maxBounds); options = options || {}; - this.stop(); + if (this._panAnim) { + this._panAnim.stop(); + } if (this._loaded && !options.reset && options !== true) {