Merge pull request #3303 from Trufi/panby-return

Map panBy always return map object
This commit is contained in:
Vladimir Agafonkin 2015-03-18 18:52:23 +02:00
commit 205575c932

View File

@ -47,7 +47,8 @@ L.Map.include({
//If we pan too far then chrome gets issues with tiles //If we pan too far then chrome gets issues with tiles
// and makes them disappear or appear in the wrong place (slightly offset) #2602 // and makes them disappear or appear in the wrong place (slightly offset) #2602
if (options.animate !== true && !this.getSize().contains(offset)) { 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) { if (!this._panAnim) {