[Libreoffice-commits] online.git: loleaflet/src
Dennis Francis (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 12 08:32:59 UTC 2020
loleaflet/src/layer/tile/CanvasTileLayer.js | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
New commits:
commit 76644df98020a69014e1fc943c9558e74ddb4480
Author: Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Fri Aug 7 19:53:19 2020 +0530
Commit: Dennis Francis <dennis.francis at collabora.com>
CommitDate: Wed Aug 12 10:32:40 2020 +0200
loleaflet: mobile/tablet: enable tile update check/requests for move
with updateInterval throttle like we do for desktop. This is necessary
for the inertia based scrolling on swipe especially when doing it
rapidly.
Change-Id: I870740c9b6cacfe56fce283f092cc68243fed1a6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100486
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis at collabora.com>
diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js b/loleaflet/src/layer/tile/CanvasTileLayer.js
index 4d7d5dc1f..93131252e 100644
--- a/loleaflet/src/layer/tile/CanvasTileLayer.js
+++ b/loleaflet/src/layer/tile/CanvasTileLayer.js
@@ -482,14 +482,11 @@ L.CanvasTileLayer = L.TileLayer.extend({
viewreset: this._viewReset,
movestart: this._moveStart,
moveend: this._move,
+ // update tiles on move, but not more often than once per given interval
+ move: L.Util.throttle(this._move, this.options.updateInterval, this),
splitposchanged: this._move,
};
- if (!this.options.updateWhenIdle) {
- // update tiles on move, but not more often than once per given interval
- events.move = L.Util.throttle(this._move, this.options.updateInterval, this);
- }
-
if (this._zoomAnimated) {
events.zoomanim = this._animateZoom;
}
More information about the Libreoffice-commits
mailing list