[Libreoffice-commits] online.git: loleaflet/src

Pranav Kant pranavk at collabora.co.uk
Wed Dec 7 10:48:02 UTC 2016


 loleaflet/src/layer/tile/GridLayer.js |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d0558bae7099fa736cacff6e6b0daba55c7aa927
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Wed Dec 7 14:27:01 2016 +0530

    loleaflet: Don't prune tiles after every tile load
    
    When the connection is slow and tiles are received after a good
    amount of lag in between them, one tile load can prune tiles (of
    earlier zoom level) for which we have not yet received the tile
    response from the server - so there's nothing we have yet to
    overlap these tiles completely, leading to grey-ish patches when zooming
    in or out.
    
    Pruning these tiles later ensures that we do not remove any tiles
    of earlier zoom levels until all the tiles have been loaded.
    
    Change-Id: Ibb03f0c6bf2031741f0b8a4584c1821539587e88

diff --git a/loleaflet/src/layer/tile/GridLayer.js b/loleaflet/src/layer/tile/GridLayer.js
index 9a62bc8..a704b42 100644
--- a/loleaflet/src/layer/tile/GridLayer.js
+++ b/loleaflet/src/layer/tile/GridLayer.js
@@ -980,13 +980,13 @@ L.GridLayer = L.Layer.extend({
 			this._fadeFrame = L.Util.requestAnimFrame(this._updateOpacity, this);
 		} else {
 			tile.active = true;
-			this._pruneTiles();
 		}
 
 		L.DomUtil.addClass(tile.el, 'leaflet-tile-loaded');
 
 		if (this._noTilesToLoad()) {
 			this.fire('load');
+			this._pruneTiles();
 		}
 	},
 


More information about the Libreoffice-commits mailing list