handle synchronous loading correctly

This commit is contained in:
mike-000
2021-06-25 12:42:49 +01:00
parent db1fa9b659
commit 44319cf233

View File

@@ -334,15 +334,15 @@ class ReprojTile extends Tile {
}.bind(this)
);
this.sourceTiles_.forEach(function (tile, i, arr) {
const state = tile.getState();
if (state == TileState.IDLE) {
tile.load();
}
});
if (leftToLoad === 0) {
setTimeout(this.reproject_.bind(this), 0);
} else {
this.sourceTiles_.forEach(function (tile, i, arr) {
const state = tile.getState();
if (state == TileState.IDLE) {
tile.load();
}
});
}
}
}