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

Mihai Varga mihai.varga at collabora.com
Fri Jul 3 06:55:32 PDT 2015


 loleaflet/src/layer/tile/TileLayer.js |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 6b52fe1436c20987729a04c1a5a026676c480503
Author: Mihai Varga <mihai.varga at collabora.com>
Date:   Fri Jul 3 16:53:20 2015 +0300

    Set opacity to 1 when replacing a tile

diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index d3a2419..b56bcef 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -420,9 +420,11 @@ L.TileLayer = L.GridLayer.extend({
 			var tile = this._tiles[key];
 			if (tile) {
 				if (tile.el.src) {
+					// cancel the animFade if there's any
+					L.DomUtil.setOpacity(tile.el, 1);
 					this._skipFadeAnimated = true;
 				}
-				if (this._tiles[key]._invalidCount && this._tiles[key]._invalidCount > 0) {
+				if (this._tiles[key]._invalidCount > 0) {
 					this._tiles[key]._invalidCount -= 1;
 				}
 				tile.el.src = 'data:image/png;base64,' + window.btoa(strBytes);


More information about the Libreoffice-commits mailing list