Remove accidently committed changes

This commit is contained in:
ahocevar
2018-11-15 13:49:16 +01:00
committed by Tim Schaub
parent 6c0b3f773b
commit 65ceb9264e
2 changed files with 6 additions and 21 deletions

View File

@@ -72,12 +72,6 @@ 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>}
@@ -318,8 +312,7 @@ class VectorImageTile extends Tile {
if (loaded == this.tileKeys.length) {
this.loadListenerKeys_.forEach(unlistenByKey);
this.loadListenerKeys_.length = 0;
this.sourceTilesLoaded = true;
this.changed();
this.setState(TileState.LOADED);
} else {
this.setState(empty == this.tileKeys.length ? TileState.EMPTY : TileState.ERROR);
}

View File

@@ -108,12 +108,6 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
*/
this.renderedLayerRevision_;
/**
* @private
* @type {Array.<import("../../VectorImageTile.js").default>}
*/
this.tilesToRender_ = [];
/**
* @private
* @type {import("../../transform.js").Transform}
@@ -140,13 +134,11 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
*/
getTile(z, x, y, pixelRatio, projection) {
const tile = super.getTile(z, x, y, pixelRatio, projection);
if (tile.getState() === TileState.IDLE) {
const key = listen(tile, EventType.CHANGE, function() {
if (tile.getState() === TileState.LOADING && tile.sourceTilesLoaded) {
this.tilesToRender_.push(tile);
unlistenByKey(key);
}
}.bind(this));
if (tile.getState() === TileState.LOADED) {
this.createReplayGroup_(/** @type {import("../../VectorImageTile.js").default} */ (tile), pixelRatio, projection);
if (this.context) {
this.renderTileImage_(/** @type {import("../../VectorImageTile.js").default} */ (tile), pixelRatio, projection);
}
}
return tile;
}