Remove the loadingIcon
in all cases when resetting the page (PR 15992 follow-up)
*Unfortunately I missed this during testing/reviewing of PR 15992.* With the changes in PR 15992 we're now only adding the `loadingIcon`-class when rendering is actually `RUNNING`, in order to improve overall performance. However when resetting the page, i.e. the `INITIAL` state, we also need to remove the `loadingIcon` completely. Without this patch if you scroll through a document where the pages don't load instantaneously, see e.g. issue 2504, we'll leave the `loadingIcon`-class attached to pages that have had their rendering cancelled *and* also been evicted from the `PDFPageViewBuffer`-instance.
This commit is contained in:
parent
9261daa233
commit
f94b348782
@ -245,7 +245,6 @@ class PDFPageView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case RenderingStates.INITIAL:
|
|
||||||
case RenderingStates.PAUSED:
|
case RenderingStates.PAUSED:
|
||||||
this.div.classList.remove("loading");
|
this.div.classList.remove("loading");
|
||||||
break;
|
break;
|
||||||
@ -260,6 +259,7 @@ class PDFPageView {
|
|||||||
this.#loadingId = null;
|
this.#loadingId = null;
|
||||||
}, 0);
|
}, 0);
|
||||||
break;
|
break;
|
||||||
|
case RenderingStates.INITIAL:
|
||||||
case RenderingStates.FINISHED:
|
case RenderingStates.FINISHED:
|
||||||
this.div.classList.remove("loadingIcon", "loading");
|
this.div.classList.remove("loadingIcon", "loading");
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user