[Libreoffice-commits] online.git: loleaflet/src
Mihai Varga
mihai.varga at collabora.com
Wed Jul 1 01:15:07 PDT 2015
loleaflet/src/layer/tile/GridLayer.js | 4 ++--
loleaflet/src/layer/tile/TileLayer.js | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit f312736e182d90d13e45aa55776f2321a8a51e33
Author: Mihai Varga <mihai.varga at collabora.com>
Date: Wed Jul 1 11:13:14 2015 +0300
Skip fadeAnimation rather than disabling it
Disabling it might cancel currently fading in tiles
e.g. when scrolling we want fadeAnimation but if a tile invalidation
occurs that would completly disble fadeAnimation and new tiles requested
by scrolling will not load
diff --git a/loleaflet/src/layer/tile/GridLayer.js b/loleaflet/src/layer/tile/GridLayer.js
index 3137e6c..79875ef 100644
--- a/loleaflet/src/layer/tile/GridLayer.js
+++ b/loleaflet/src/layer/tile/GridLayer.js
@@ -453,7 +453,7 @@ L.GridLayer = L.Layer.extend({
},
_move: function () {
- this._fadeAnimated = true;
+ this._skipFadeAnimated = false;
this._update();
},
@@ -692,7 +692,7 @@ L.GridLayer = L.Layer.extend({
if (!tile) { return; }
tile.loaded = +new Date();
- if (this._map._fadeAnimated) {
+ if (this._map._fadeAnimated && !this._skipFadeAnimated) {
L.DomUtil.setOpacity(tile.el, 0);
L.Util.cancelAnimFrame(this._fadeFrame);
this._fadeFrame = L.Util.requestAnimFrame(this._updateOpacity, this);
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 276d763..423d87e 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -418,7 +418,7 @@ L.TileLayer = L.GridLayer.extend({
var tile = this._tiles[key];
if (tile) {
if (tile.el.src) {
- this._map._fadeAnimated = false;
+ this._skipFadeAnimated = true;
}
if (this._tiles[key]._invalidCount && this._tiles[key]._invalidCount > 0) {
this._tiles[key]._invalidCount -= 1;
@@ -1010,7 +1010,7 @@ L.TileLayer = L.GridLayer.extend({
_onZoom: function (e) {
if (e.type === 'zoomstart') {
- this._fadeAnimated = false;
+ this._skipFadeAnimated = true;
}
else if (e.type === 'zoomend') {
this._onUpdateCursor();
More information about the Libreoffice-commits
mailing list