Don't remove the loading icon from the DOM when a page is resetted
This commit is contained in:
parent
d90e62e806
commit
20037e9919
@ -429,6 +429,7 @@ class PDFPageView {
|
|||||||
case annotationEditorLayerNode:
|
case annotationEditorLayerNode:
|
||||||
case xfaLayerNode:
|
case xfaLayerNode:
|
||||||
case textLayerNode:
|
case textLayerNode:
|
||||||
|
case this.loadingIconDiv:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
node.remove();
|
node.remove();
|
||||||
@ -472,8 +473,18 @@ class PDFPageView {
|
|||||||
delete this.svg;
|
delete this.svg;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.loadingIconDiv = document.createElement("div");
|
if (!this.loadingIconDiv) {
|
||||||
this.loadingIconDiv.className = "loadingIcon notVisible";
|
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 (
|
if (
|
||||||
(typeof PDFJSDev === "undefined" ||
|
(typeof PDFJSDev === "undefined" ||
|
||||||
PDFJSDev.test("!PRODUCTION || GENERIC")) &&
|
PDFJSDev.test("!PRODUCTION || GENERIC")) &&
|
||||||
@ -481,11 +492,6 @@ class PDFPageView {
|
|||||||
) {
|
) {
|
||||||
this.toggleLoadingIconSpinner(/* viewVisible = */ true);
|
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 }) {
|
update({ scale = 0, rotation = null, optionalContentConfigPromise = null }) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user