Skip to content

Commit

Permalink
update imagesPending assigngment
Browse files Browse the repository at this point in the history
  • Loading branch information
danieltbrennan authored and stephenwf committed May 8, 2024
1 parent f010ce1 commit efd645e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/canvas-renderer/canvas-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export class CanvasRenderer implements Renderer {
// this.ctx.translate(-this.canvas.width / 2, -this.canvas.height / 2);
this.frameIsRendering = false;
// After we've rendered, we'll set the pending and loading to correct values.
this.imagesPending = this.imagesPending - this.imagesLoaded;
this.imagesPending = Math.min(0, this.imagesPending - this.imagesLoaded);
this.imagesLoaded = 0;
if (!this.loadingQueueOrdered /*&& this.loadingQueue.length > this.parallelTasks*/) {
this.loadingQueue = this.loadingQueue.sort((a, b) => {
Expand Down

0 comments on commit efd645e

Please sign in to comment.