Use render tiles instead of source tiles for hit detection

This commit is contained in:
Andreas Hocevar
2019-10-30 11:44:12 +01:00
parent 97d0d277fb
commit 7097a4c6ba
3 changed files with 29 additions and 35 deletions

View File

@@ -61,6 +61,11 @@ class VectorRenderTile extends Tile {
*/
this.errorSourceTileKeys = {};
/**
* @type {ImageData}
*/
this.hitDetectionImageData = null;
/**
* @private
* @type {!Object<string, ReplayState>}
@@ -73,9 +78,9 @@ class VectorRenderTile extends Tile {
this.wantedResolution;
/**
* @type {!function(import("./VectorRenderTile.js").default):Array<import("./VectorTile.js").default>}
* @type {!function():Array<import("./VectorTile.js").default>}
*/
this.getSourceTiles_ = getSourceTiles;
this.getSourceTiles = getSourceTiles.bind(this, this);
/**
* @type {!function(import("./VectorRenderTile.js").default):void}
@@ -186,7 +191,7 @@ class VectorRenderTile extends Tile {
* @inheritDoc
*/
load() {
this.getSourceTiles_(this);
this.getSourceTiles();
}
}