[Libreoffice-commits] online.git: loleaflet/src
László Németh
laszlo.nemeth at collabora.com
Tue Feb 21 10:40:58 UTC 2017
loleaflet/src/layer/tile/TileLayer.js | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit cc3b521572ccc33875ee179ca6c78b61cffb5087
Author: László Németh <laszlo.nemeth at collabora.com>
Date: Tue Feb 21 11:22:20 2017 +0100
loleaflet: debug mode: fade out blue color of the tiles
after 1 sec, if it wasn't removed by a tile update.
From commit bc19f90dd48a1792fca9d5b7bbf13b8f1b35134b
(Don't send a tile that hasn't changed even if client asks for it),
blue color of the requested tiles isn't removed completely.
Change-Id: I0f4c152f61c2b0f70f1b7c23bd63d3e0bc80ec74
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 6deb46e..f86b5bd 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -2018,6 +2018,7 @@ L.TileLayer = L.GridLayer.extend({
if (tile._debugTile) {
tile._debugTile.setStyle({fillOpacity: 0.5, fillColor: 'blue'});
tile._debugTime.date = +new Date();
+ tile._debugTile.date = +new Date();
tile._debugInvalidateCount++;
this._debugInvalidateCount++;
}
@@ -2052,6 +2053,14 @@ L.TileLayer = L.GridLayer.extend({
rect.setStyle({fillOpacity: opac - 0.04});
}
}
+ for (var key in this._debugTiles) {
+ var rect = this._debugTiles[key];
+ var col = rect.options.fillColor;
+ var opac = rect.options.fillOpacity;
+ if (col === 'blue' && opac >= 0.04 && rect.date + 1000 < +new Date()) {
+ rect.setStyle({fillOpacity: opac - 0.04});
+ }
+ }
this._debugTimeoutId = setTimeout(function () { map._docLayer._debugTimeout(); }, 50);
}
},
More information about the Libreoffice-commits
mailing list