mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Interactive forms: remove global PDFJS usage
This commit is contained in:
parent
f062695d62
commit
2da2c45889
6 changed files with 30 additions and 14 deletions
|
@ -211,6 +211,7 @@ var PDFViewerApplication = {
|
|||
linkService: pdfLinkService,
|
||||
downloadManager: downloadManager,
|
||||
enhanceTextSelection: false,
|
||||
renderInteractiveForms: false,
|
||||
});
|
||||
pdfRenderingQueue.setViewer(this.pdfViewer);
|
||||
pdfLinkService.setViewer(this.pdfViewer);
|
||||
|
@ -371,7 +372,10 @@ var PDFViewerApplication = {
|
|||
PDFJS.externalLinkTarget = value;
|
||||
}),
|
||||
Preferences.get('renderInteractiveForms').then(function resolved(value) {
|
||||
PDFJS.renderInteractiveForms = value;
|
||||
// TODO: Like the `enhanceTextSelection` preference, move the
|
||||
// initialization and fetching of `Preferences` to occur
|
||||
// before the various viewer components are initialized.
|
||||
self.pdfViewer.renderInteractiveForms = value;
|
||||
}),
|
||||
// TODO move more preferences and other async stuff here
|
||||
]).catch(function (reason) { });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue