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
@ -1023,7 +1023,6 @@ const PDFViewerApplication = {
|
|||||||
// Set the necessary API parameters, using all the available options.
|
// Set the necessary API parameters, using all the available options.
|
||||||
const apiParams = AppOptions.getAll(OptionKind.API);
|
const apiParams = AppOptions.getAll(OptionKind.API);
|
||||||
const params = {
|
const params = {
|
||||||
canvasMaxAreaInBytes: AppOptions.get("canvasMaxAreaInBytes"),
|
|
||||||
...apiParams,
|
...apiParams,
|
||||||
...args,
|
...args,
|
||||||
};
|
};
|
||||||
|
@ -57,7 +57,7 @@ const defaultOptions = {
|
|||||||
canvasMaxAreaInBytes: {
|
canvasMaxAreaInBytes: {
|
||||||
/** @type {number} */
|
/** @type {number} */
|
||||||
value: -1,
|
value: -1,
|
||||||
kind: OptionKind.BROWSER,
|
kind: OptionKind.BROWSER + OptionKind.API,
|
||||||
},
|
},
|
||||||
isInAutomation: {
|
isInAutomation: {
|
||||||
/** @type {boolean} */
|
/** @type {boolean} */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user