[Libreoffice-commits] online.git: loleaflet/src
Dennis Francis (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jul 5 14:37:45 UTC 2020
loleaflet/src/layer/tile/CalcTileLayer.js | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit 33850593011b96ba2ed485811c6ff920b906d1dd
Author: Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Wed May 27 20:26:30 2020 +0530
Commit: Dennis Francis <dennis.francis at collabora.com>
CommitDate: Sun Jul 5 16:37:25 2020 +0200
Avoid position recomputations if no change in zoom
Change-Id: I25bab150c9e8f13a52f67c8f908f0d27206e6993
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98113
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Dennis Francis <dennis.francis at collabora.com>
diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js
index 16b1005e0..db08b2019 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -1003,6 +1003,17 @@ L.SheetDimension = L.Class.extend({
updatePositions = true;
}
+ // Avoid position re-computations if no change in Zoom/dpiScale.
+ if (this._tileSizeTwips === tileSizeTwips &&
+ this._tileSizeCSSPixels === tileSizeCSSPixels &&
+ this._dpiScale === dpiScale) {
+ return;
+ }
+
+ this._tileSizeTwips = tileSizeTwips;
+ this._tileSizeCSSPixels = tileSizeCSSPixels;
+ this._dpiScale = dpiScale;
+
this._twipsPerCSSPixel = tileSizeTwips / tileSizeCSSPixels;
this._devPixelsPerCssPixel = dpiScale;
More information about the Libreoffice-commits
mailing list