Skip to content

Commit

Permalink
fix: remove persisting gosling-track
Browse files Browse the repository at this point in the history
  • Loading branch information
etowahadams committed Jan 29, 2024
1 parent 85b32de commit ed64b5d
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/tracks/gosling-track/gosling-track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ const factory: PluginTrackFactory<Tile, GoslingTrackOptions> = (HGC, context, op
#loadingText = new HGC.libraries.PIXI.Text('', loadingTextStyle);
prevVisibleAndFetchedTiles?: Tile[];
resolvedTracks: SingleTrack[] | undefined;
// This is used to persist processed tile info across draw() calls.
#processedTileMap: WeakMap<Tile, boolean> = new WeakMap();

/* *
*
Expand Down Expand Up @@ -557,11 +555,6 @@ const factory: PluginTrackFactory<Tile, GoslingTrackOptions> = (HGC, context, op
this.tileSize = this.tilesetInfo?.tile_size ?? 1024;

const tiles = this.visibleAndFetchedTiles();
// If we have already processed all tiles, we don't need to do anything
// this.#processedTileMap contains all of data needed to draw
if (tiles.every(tile => this.#processedTileMap.get(tile) !== undefined)) {
return;
}

// generated tabular data
tiles.forEach(tile => this.#generateTabularData(tile, force));
Expand All @@ -578,9 +571,6 @@ const factory: PluginTrackFactory<Tile, GoslingTrackOptions> = (HGC, context, op
if (flatTileData.length !== 0) {
this.options.siblingIds.forEach(id => publish('rawData', { id, data: flatTileData }));
}
tiles.forEach(tile => {
this.#processedTileMap.set(tile, true);
});
}

/**
Expand Down

0 comments on commit ed64b5d

Please sign in to comment.