[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-0' - loleaflet/src

Pranav Kant pranavk at collabora.co.uk
Thu Dec 8 16:30:42 UTC 2016


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

New commits:
commit 1a5ee289c039f13d1d23299c2041eeaf7433981a
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
    (cherry picked from commit d0558bae7099fa736cacff6e6b0daba55c7aa927)
    Reviewed-on: https://gerrit.libreoffice.org/31756
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

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