[Libreoffice-commits] online.git: loleaflet/src
Mihai Varga
mihai.mv13 at gmail.com
Thu Jun 25 02:37:18 PDT 2015
loleaflet/src/layer/tile/GridLayer.js | 4 ++++
loleaflet/src/layer/tile/TileLayer.js | 5 +++--
2 files changed, 7 insertions(+), 2 deletions(-)
New commits:
commit bc65f57a5486e1120ce52fe994cc13111d37c3f1
Author: Mihai Varga <mihai.mv13 at gmail.com>
Date: Thu Jun 25 12:35:31 2015 +0300
tile invalidation: don't disable animFrame
This affects zooming. Instead just skip the method that calls
the animation frame
diff --git a/loleaflet/src/layer/tile/GridLayer.js b/loleaflet/src/layer/tile/GridLayer.js
index bab0c23..1996cad 100644
--- a/loleaflet/src/layer/tile/GridLayer.js
+++ b/loleaflet/src/layer/tile/GridLayer.js
@@ -673,6 +673,10 @@ L.GridLayer = L.Layer.extend({
if (!tile) { return; }
tile.loaded = +new Date();
+ if (tile._skipAnim) {
+ this._tiles[key]._skipAnim = null;
+ return;
+ }
if (this._map._fadeAnimated) {
L.DomUtil.setOpacity(tile.el, 0);
L.Util.cancelAnimFrame(this._fadeFrame);
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index a21481b..dca1acc 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -309,8 +309,6 @@ L.TileLayer = L.GridLayer.extend({
var bottomRightTwips = topLeftTwips.add(offset);
var invalidBounds = new L.Bounds(topLeftTwips, bottomRightTwips);
- this._map._fadeAnimated = false;
-
for (var key in this._tiles) {
var coords = this._tiles[key].coords;
var point1 = this._coordsToTwips(coords);
@@ -371,6 +369,9 @@ L.TileLayer = L.GridLayer.extend({
var key = this._tileCoordsToKey(coords);
var tile = this._tiles[key];
if (tile) {
+ if (tile.el.src) {
+ this._tiles[key]._skipAnim = true;
+ }
tile.el.src = 'data:image/png;base64,' + window.btoa(strBytes);
}
}
More information about the Libreoffice-commits
mailing list