Fix reloading tiles in case of an error with tile.load()

This commit is contained in:
Andreas Hocevar
2022-07-21 23:18:31 +02:00
parent 1c68d5093d
commit a1d68b4f66
7 changed files with 97 additions and 10 deletions
+7
View File
@@ -5,6 +5,13 @@ import LRUCache from './structs/LRUCache.js';
import {fromKey, getKey} from './tilecoord.js';
class TileCache extends LRUCache {
clear() {
while (this.getCount() > 0) {
this.pop().release();
}
super.clear();
}
/**
* @param {!Object<string, boolean>} usedTiles Used tiles.
*/