From b93d42880e48fbee60a0e65e6cbfdc2650e59a5c Mon Sep 17 00:00:00 2001 From: Mstislav Zhivodkov Date: Thu, 12 Mar 2015 12:10:53 +0600 Subject: [PATCH] map panBy always return map --- src/map/anim/Map.PanAnimation.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/map/anim/Map.PanAnimation.js b/src/map/anim/Map.PanAnimation.js index 9dddff5f..007ead88 100644 --- a/src/map/anim/Map.PanAnimation.js +++ b/src/map/anim/Map.PanAnimation.js @@ -47,7 +47,8 @@ L.Map.include({ //If we pan too far then chrome gets issues with tiles // and makes them disappear or appear in the wrong place (slightly offset) #2602 if (options.animate !== true && !this.getSize().contains(offset)) { - return this._resetView(this.unproject(this.project(this.getCenter()).add(offset)), this.getZoom()); + this._resetView(this.unproject(this.project(this.getCenter()).add(offset)), this.getZoom()); + return this; } if (!this._panAnim) {