From 16813650406a884c3cb3ed41cba1079ea6208f24 Mon Sep 17 00:00:00 2001 From: danzel Date: Thu, 21 Feb 2013 15:15:24 +1300 Subject: [PATCH] Fix building without zoom animations enabled --- src/layer/tile/TileLayer.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/layer/tile/TileLayer.js b/src/layer/tile/TileLayer.js index 637bd14b..30e2f45f 100644 --- a/src/layer/tile/TileLayer.js +++ b/src/layer/tile/TileLayer.js @@ -524,9 +524,11 @@ L.TileLayer = L.Class.extend({ if (!this._tilesToLoad) { this.fire('load'); - // clear scaled tiles after all new tiles are loaded (for performance) - clearTimeout(this._clearBgBufferTimer); - this._clearBgBufferTimer = setTimeout(L.bind(this._clearBgBuffer, this), 500); + if (this._animated) { + // clear scaled tiles after all new tiles are loaded (for performance) + clearTimeout(this._clearBgBufferTimer); + this._clearBgBufferTimer = setTimeout(L.bind(this._clearBgBuffer, this), 500); + } } },