mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Re-factor how the canvasMaxAreaInBytes
-option is handled in PDFViewerApplication.open
(PR 17208 follow-up)
With the changes in PR 17208, where browser-preferences are now handled as "regular" viewer-options, we can tweak the definition of `canvasMaxAreaInBytes` to slightly simplify things in the `PDFViewerApplication.open` method.
This commit is contained in:
parent
f528f6f07b
commit
8bbfcd3bef
2 changed files with 1 additions and 2 deletions
|
@ -1023,7 +1023,6 @@ const PDFViewerApplication = {
|
|||
// Set the necessary API parameters, using all the available options.
|
||||
const apiParams = AppOptions.getAll(OptionKind.API);
|
||||
const params = {
|
||||
canvasMaxAreaInBytes: AppOptions.get("canvasMaxAreaInBytes"),
|
||||
...apiParams,
|
||||
...args,
|
||||
};
|
||||
|
|
|
@ -57,7 +57,7 @@ const defaultOptions = {
|
|||
canvasMaxAreaInBytes: {
|
||||
/** @type {number} */
|
||||
value: -1,
|
||||
kind: OptionKind.BROWSER,
|
||||
kind: OptionKind.BROWSER + OptionKind.API,
|
||||
},
|
||||
isInAutomation: {
|
||||
/** @type {boolean} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue