mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 23:28:06 +02:00
Move the disableStream
option from the global PDFJS
object and into getDocument
instead
This commit is contained in:
parent
b69abf1111
commit
05c05bdef5
5 changed files with 15 additions and 14 deletions
|
@ -201,10 +201,10 @@ let PDFViewerApplication = {
|
|||
AppOptions.set('disableRange', value);
|
||||
}),
|
||||
preferences.get('disableStream').then(function resolved(value) {
|
||||
if (PDFJS.disableStream === true) {
|
||||
if (AppOptions.get('disableStream') === true) {
|
||||
return;
|
||||
}
|
||||
PDFJS.disableStream = value;
|
||||
AppOptions.set('disableStream', value);
|
||||
}),
|
||||
preferences.get('disableAutoFetch').then(function resolved(value) {
|
||||
AppOptions.set('disableAutoFetch', value);
|
||||
|
@ -263,7 +263,7 @@ let PDFViewerApplication = {
|
|||
AppOptions.set('disableRange', hashParams['disablerange'] === 'true');
|
||||
}
|
||||
if ('disablestream' in hashParams) {
|
||||
PDFJS.disableStream = (hashParams['disablestream'] === 'true');
|
||||
AppOptions.set('disableStream', hashParams['disablestream'] === 'true');
|
||||
}
|
||||
if ('disableautofetch' in hashParams) {
|
||||
AppOptions.set('disableAutoFetch',
|
||||
|
|
|
@ -155,6 +155,11 @@ const defaultOptions = {
|
|||
value: apiCompatibilityParams.disableRange || false,
|
||||
kind: OptionKind.API,
|
||||
},
|
||||
disableStream: {
|
||||
/** @type {boolean} */
|
||||
value: apiCompatibilityParams.disableStream || false,
|
||||
kind: OptionKind.API,
|
||||
},
|
||||
isEvalSupported: {
|
||||
/** @type {boolean} */
|
||||
value: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue