[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-4' - loleaflet/src
Marco Cecchetti (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 8 20:13:31 UTC 2020
loleaflet/src/control/Ruler.js | 7 ++++++-
loleaflet/src/layer/tile/GridLayer.js | 7 +------
2 files changed, 7 insertions(+), 7 deletions(-)
New commits:
commit 54f9727bdbf3990b02c8cc85ee36c28f20cd2cc3
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
AuthorDate: Sun May 24 19:03:47 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Jun 8 22:13:13 2020 +0200
loleaflet: writer zoom flickers
Change-Id: I9186bbae55269870fc693b65c3e90b149375eba9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95496
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Tested-by: Jenkins
Tested-by: Michael Meeks <michael.meeks at collabora.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95766
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/src/control/Ruler.js b/loleaflet/src/control/Ruler.js
index b3cb520b9..040ec3442 100644
--- a/loleaflet/src/control/Ruler.js
+++ b/loleaflet/src/control/Ruler.js
@@ -409,7 +409,12 @@ L.Control.Ruler = L.Control.extend({
var firstTileXTranslate = parseInt(firstTile.style.left) - this._map._docLayer._tileWidthPx * columnNumber;
var tileContainer = mapPane.getElementsByClassName('leaflet-tile-container');
- tileContainer = tileContainer[tileContainer.length - 1];
+ for (var i = 0; i < tileContainer.length; ++i) {
+ if (parseInt(tileContainer[i].style.zIndex) === this._map.getMaxZoom()) {
+ tileContainer = tileContainer[i];
+ break;
+ }
+ }
var tileContainerXTranslate = parseInt(tileContainer.style.transform.match(/\(([-0-9]*)/)[1]);
var mapPaneXTranslate = parseInt(mapPane.style.transform.match(/\(([-0-9]*)/)[1]);
diff --git a/loleaflet/src/layer/tile/GridLayer.js b/loleaflet/src/layer/tile/GridLayer.js
index 850981777..91dd404e8 100644
--- a/loleaflet/src/layer/tile/GridLayer.js
+++ b/loleaflet/src/layer/tile/GridLayer.js
@@ -211,12 +211,7 @@ L.GridLayer = L.Layer.extend({
maxZoom = this.options.maxZoom;
for (var z in this._levels) {
- if (this._levels[z].el.children.length || z === zoom) {
- this._levels[z].el.style.zIndex = maxZoom - Math.abs(zoom - z);
- } else {
- L.DomUtil.remove(this._levels[z].el);
- delete this._levels[z];
- }
+ this._levels[z].el.style.zIndex = maxZoom - Math.abs(zoom - z);
}
var level = this._levels[zoom],
More information about the Libreoffice-commits
mailing list