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:
Jonas Jenwald 2023-11-03 09:56:37 +01:00
parent f528f6f07b
commit 8bbfcd3bef
2 changed files with 1 additions and 2 deletions

View File

@ -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,
};

View File

@ -57,7 +57,7 @@ const defaultOptions = {
canvasMaxAreaInBytes: {
/** @type {number} */
value: -1,
kind: OptionKind.BROWSER,
kind: OptionKind.BROWSER + OptionKind.API,
},
isInAutomation: {
/** @type {boolean} */