mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Don't remove the loading icon from the DOM when a page is resetted
This commit is contained in:
parent
d90e62e806
commit
20037e9919
1 changed files with 13 additions and 7 deletions
|
@ -429,6 +429,7 @@ class PDFPageView {
|
|||
case annotationEditorLayerNode:
|
||||
case xfaLayerNode:
|
||||
case textLayerNode:
|
||||
case this.loadingIconDiv:
|
||||
continue;
|
||||
}
|
||||
node.remove();
|
||||
|
@ -472,8 +473,18 @@ class PDFPageView {
|
|||
delete this.svg;
|
||||
}
|
||||
|
||||
this.loadingIconDiv = document.createElement("div");
|
||||
this.loadingIconDiv.className = "loadingIcon notVisible";
|
||||
if (!this.loadingIconDiv) {
|
||||
this.loadingIconDiv = document.createElement("div");
|
||||
this.loadingIconDiv.className = "loadingIcon notVisible";
|
||||
this.loadingIconDiv.setAttribute("role", "img");
|
||||
this.l10n.get("loading").then(msg => {
|
||||
this.loadingIconDiv?.setAttribute("aria-label", msg);
|
||||
});
|
||||
div.append(this.loadingIconDiv);
|
||||
} else {
|
||||
this.toggleLoadingIconSpinner();
|
||||
}
|
||||
|
||||
if (
|
||||
(typeof PDFJSDev === "undefined" ||
|
||||
PDFJSDev.test("!PRODUCTION || GENERIC")) &&
|
||||
|
@ -481,11 +492,6 @@ class PDFPageView {
|
|||
) {
|
||||
this.toggleLoadingIconSpinner(/* viewVisible = */ true);
|
||||
}
|
||||
this.loadingIconDiv.setAttribute("role", "img");
|
||||
this.l10n.get("loading").then(msg => {
|
||||
this.loadingIconDiv?.setAttribute("aria-label", msg);
|
||||
});
|
||||
div.append(this.loadingIconDiv);
|
||||
}
|
||||
|
||||
update({ scale = 0, rotation = null, optionalContentConfigPromise = null }) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue