Merge pull request #15852 from Snuffleupagus/layerProperties-followup

A couple of small viewer fixes (PR 15811 and 15831 follow-up)
This commit is contained in:
Jonas Jenwald 2022-12-19 23:09:26 +01:00 committed by GitHub
commit a749f6cc14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

View File

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

View File

@ -47,7 +47,6 @@ import { AnnotationEditorLayerBuilder } from "./annotation_editor_layer_builder.
import { AnnotationLayerBuilder } from "./annotation_layer_builder.js"; import { AnnotationLayerBuilder } from "./annotation_layer_builder.js";
import { compatibilityParams } from "./app_options.js"; import { compatibilityParams } from "./app_options.js";
import { NullL10n } from "./l10n_utils.js"; import { NullL10n } from "./l10n_utils.js";
import { SimpleLinkService } from "./pdf_link_service.js";
import { StructTreeLayerBuilder } from "./struct_tree_layer_builder.js"; import { StructTreeLayerBuilder } from "./struct_tree_layer_builder.js";
import { TextAccessibilityManager } from "./text_accessibility.js"; import { TextAccessibilityManager } from "./text_accessibility.js";
import { TextHighlighter } from "./text_highlighter.js"; import { TextHighlighter } from "./text_highlighter.js";
@ -104,7 +103,10 @@ const DEFAULT_LAYER_PROPERTIES = () => {
fieldObjectsPromise: null, fieldObjectsPromise: null,
findController: null, findController: null,
hasJSActionsPromise: null, hasJSActionsPromise: null,
linkService: new SimpleLinkService(), get linkService() {
const { SimpleLinkService } = require("./pdf_link_service.js");
return new SimpleLinkService();
},
}; };
}; };