handle synchronous loading correctly

This commit is contained in:
mike-000
2021-06-25 12:42:49 +01:00
parent db1fa9b659
commit 44319cf233
+3 -3
View File
@@ -334,15 +334,15 @@ class ReprojTile extends Tile {
}.bind(this) }.bind(this)
); );
if (leftToLoad === 0) {
setTimeout(this.reproject_.bind(this), 0);
} else {
this.sourceTiles_.forEach(function (tile, i, arr) { this.sourceTiles_.forEach(function (tile, i, arr) {
const state = tile.getState(); const state = tile.getState();
if (state == TileState.IDLE) { if (state == TileState.IDLE) {
tile.load(); tile.load();
} }
}); });
if (leftToLoad === 0) {
setTimeout(this.reproject_.bind(this), 0);
} }
} }
} }