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

Pranam Lashkari (via logerrit) logerrit at kemper.freedesktop.org
Wed Feb 12 19:00:50 UTC 2020


 loleaflet/src/map/handler/Map.TouchGesture.js |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit a867a1b79cf78282e2fce12a5ad02d5cb17f3641
Author:     Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Wed Feb 12 05:43:10 2020 +0530
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Wed Feb 12 20:00:30 2020 +0100

    Tile loading enabled while autoscrolling
    
    if scrolled too fast tiles could not load until auto scrolling stops
    and user had to wait for approx 2 sec and wait for tile to load
    
    follow up for: https://gerrit.libreoffice.org/c/online/+/88072
    
    Change-Id: I09541f5400288398ac7680c6d96e224e2ad6ef66
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88485
    Tested-by: Henry Castro <hcastro at collabora.com>
    Reviewed-by: Henry Castro <hcastro at collabora.com>

diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js b/loleaflet/src/map/handler/Map.TouchGesture.js
index 72f6c4166..0d972d58a 100644
--- a/loleaflet/src/map/handler/Map.TouchGesture.js
+++ b/loleaflet/src/map/handler/Map.TouchGesture.js
@@ -635,7 +635,14 @@ L.Map.TouchGesture = L.Handler.extend({
 			this._map.dragging._draggable._startPoint = this._startSwipePoint;
 			this._map.dragging._draggable._startPos = this._newPos;
 			this._newPos._add(delta);
+
 			this._map.dragging._draggable._onMove(e);
+
+			// Updates the tiles
+			clearInterval(this._map._docLayer._tilesPreFetcher);
+			this._map._docLayer._preFetchBorder = null;
+			this._map._docLayer._preFetchTiles();
+
 			this.autoscrollAnimReq = L.Util.requestAnimFrame(this._autoscroll, this, true);
 		}
 		else {


More information about the Libreoffice-commits mailing list