New render event API (non functional yet)

This commit is contained in:
ahocevar
2018-11-15 13:22:06 +01:00
committed by Tim Schaub
parent f90efac131
commit 6c0b3f773b
6 changed files with 58 additions and 22 deletions

View File

@@ -72,6 +72,12 @@ class VectorImageTile extends Tile {
*/
this.sourceTiles_ = sourceTiles;
/**
* @private
* @type {boolean}
*/
this.sourceTilesLoaded = false;
/**
* Keys of source tiles used by this tile. Use with {@link #getTile}.
* @type {Array<string>}
@@ -312,7 +318,8 @@ class VectorImageTile extends Tile {
if (loaded == this.tileKeys.length) {
this.loadListenerKeys_.forEach(unlistenByKey);
this.loadListenerKeys_.length = 0;
this.setState(TileState.LOADED);
this.sourceTilesLoaded = true;
this.changed();
} else {
this.setState(empty == this.tileKeys.length ? TileState.EMPTY : TileState.ERROR);
}