Fix the loadingBar initialization in the "mobile-viewer" example (PR 15831 follow-up)

Given that the `ProgressBar`-constructor was updated, we need to update the "mobile-viewer" example as well; this is yet another thing I missed during review.
This commit is contained in:
Jonas Jenwald 2022-12-19 01:10:11 +01:00
parent e8c7278337
commit f3d7f2e64f

View File

@ -161,9 +161,12 @@ const PDFViewerApplication = {
},
get loadingBar() {
const bar = new pdfjsViewer.ProgressBar("loadingBar");
return pdfjsLib.shadow(this, "loadingBar", bar);
const bar = document.getElementById("loadingBar");
return pdfjsLib.shadow(
this,
"loadingBar",
new pdfjsViewer.ProgressBar(bar)
);
},
setTitleUsingUrl: function pdfViewSetTitleUsingUrl(url) {