Closed danieltbrennan closed 4 months ago
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Looks good @danieltbrennan. Is it worth also changing assignment to:
this.imagesPending = Math.min(0, this.imagesPending - this.imagesLoaded)
Just so the opacity condition is always met, even if there is another cause.
do we ever need to worry about the CanvasRenderer being reused? ie, do we need to worry abotu emptying the processed array?
We don't cancel the images (at the moment) so if it was reused, it would just continue loading and keeping the imagesPending
up to date.. in theory!
cool! thanks
Stephen, is it possible to get a release in CanvasPanel with this too?
Sorry, yes! Just had some other things. Kicked off the release for Atlas (v2.2.3) should be available soon. Will update canvas panel after
This adds the image ids to an array
imageIdsLoaded
which is then evaluated inschedulePaintToCanvas
before incrementingimagesLoaded
to avoid a scenario where a repeated calls to the method for the same image can result in a negative value for the latter, leaving the atlas canvas in a state where the opacity style never updates to 1 as observed in https://github.com/atlas-viewer/atlas/issues/49.