Ensure proper tile load sequence

This commit is contained in:
Andreas Hocevar
2019-09-28 15:20:45 +02:00
parent 32644c7ba9
commit 7f8fdd6219
3 changed files with 18 additions and 5 deletions
+3
View File
@@ -241,6 +241,9 @@ class Tile extends EventTarget {
* @api
*/
setState(state) {
if (this.state !== TileState.ERROR && this.state > state) {
throw new Error('Tile load sequence violation');
}
this.state = state;
this.changed();
}