Skip to content

Commit

Permalink
Fix #916, remove __loadAbort field
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Jan 9, 2025
1 parent bd442b0 commit db16735
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/base/TilesRendererBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,6 @@ export class TilesRendererBase {

tile.__loadingState = UNLOADED;

tile.__loadAbort = null;

if ( parentTile === null ) {

tile.__depth = 0;
Expand Down Expand Up @@ -632,13 +630,16 @@ export class TilesRendererBase {
const downloadQueue = this.downloadQueue;
const parseQueue = this.parseQueue;
const extension = getUrlExtension( uri );

// track an abort controller and pass-through the below conditions if aborted
const controller = new AbortController();
const signal = controller.signal;
const addedSuccessfully = lruCache.add( tile, t => {

// Stop the load if it's started
if ( t.__loadingState === LOADING ) {

t.__loadAbort.abort();
t.__loadAbort = null;
controller.abort();

} else if ( isExternalTileSet ) {

Expand Down Expand Up @@ -680,13 +681,8 @@ export class TilesRendererBase {

}

// track an abort controller and pass-through the below conditions if aborted
const controller = new AbortController();
const signal = controller.signal;

stats.inCache ++;
stats.downloading ++;
tile.__loadAbort = controller;
tile.__loadingState = LOADING;

// queue the download and parse
Expand Down Expand Up @@ -731,7 +727,6 @@ export class TilesRendererBase {

stats.downloading --;
stats.parsing ++;
tile.__loadAbort = null;
tile.__loadingState = PARSING;

return parseQueue.add( tile, parseTile => {
Expand Down

0 comments on commit db16735

Please sign in to comment.