Fix building without zoom animations enabled

This commit is contained in:
danzel 2013-02-21 15:15:24 +13:00
parent 16b09c758a
commit 1681365040

View File

@ -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);
}
}
},