summaryrefslogtreecommitdiff
path: root/loleaflet
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2020-09-01 21:35:35 +0100
committerJan Holesovsky <kendy@collabora.com>2020-09-17 15:03:01 +0200
commit367a0b75fba01745d67cf16cf0d10e52c59c7de5 (patch)
tree95ee927d174c546356908fc8c31950a695b4786a /loleaflet
parent0184833ace3805f5c2c929c9127f1c68edc3c153 (diff)
calc canvas: paint invalid tiles until their replacement arrives.
This avoids display corruption when panning, whereby stale/old canvas content would continue to be rendered in the 'holes' where invalid tiles were not rendered. Change-Id: Ic886c0924c5a930116b1437c8e0cf35726ab76a5
Diffstat (limited to 'loleaflet')
-rw-r--r--loleaflet/src/layer/tile/CanvasTileLayer.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/loleaflet/src/layer/tile/CanvasTileLayer.js b/loleaflet/src/layer/tile/CanvasTileLayer.js
index 8643f8bf7..6d6aacecd 100644
--- a/loleaflet/src/layer/tile/CanvasTileLayer.js
+++ b/loleaflet/src/layer/tile/CanvasTileLayer.js
@@ -253,7 +253,7 @@ L.CanvasTilePainter = L.Class.extend({
!splitPosChanged &&
!scaleChanged);
- console.debug('Tile size: ' + this._layer._getTileSize());
+// console.debug('Tile size: ' + this._layer._getTileSize());
if (skipUpdate)
return;
@@ -306,10 +306,14 @@ L.CanvasTilePainter = L.Class.extend({
var key = coords.key();
var tile = this._layer._tiles[key];
- var invalid = tile && tile._invalidCount && tile._invalidCount > 0;
- if (tile && tile.loaded && !invalid) {
+// var invalid = tile && tile._invalidCount && tile._invalidCount > 0;
+ if (tile && tile.loaded) {
this.paint(tile, ctx);
}
+/* else
+ console.log('missing tile at ' + i + ', ' + j + ' ' +
+ tile + ' ' + (tile && tile.loaded) + ' ' +
+ (tile ? tile._invalidCount : -42) + ' ' + invalid); */
}
}
}