From 8bbfcd3bef0d265c928a776fcdd66f2100fbb554 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Fri, 3 Nov 2023 09:56:37 +0100 Subject: [PATCH] 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. --- web/app.js | 1 - web/app_options.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/web/app.js b/web/app.js index 36ef5d47a..2f0018e81 100644 --- a/web/app.js +++ b/web/app.js @@ -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, }; diff --git a/web/app_options.js b/web/app_options.js index 970b0ba83..dbde2ed7b 100644 --- a/web/app_options.js +++ b/web/app_options.js @@ -57,7 +57,7 @@ const defaultOptions = { canvasMaxAreaInBytes: { /** @type {number} */ value: -1, - kind: OptionKind.BROWSER, + kind: OptionKind.BROWSER + OptionKind.API, }, isInAutomation: { /** @type {boolean} */