Only define the renderer-option in the GENERIC viewer

Given that the SVG back-end is not defined anywhere except in GENERIC builds, we can remove a little bit of unnecessary code in e.g. the Firefox PDF Viewer.
This commit is contained in:
Jonas Jenwald 2022-06-16 16:11:47 +02:00
parent c3d0858062
commit df79b18a31
3 changed files with 15 additions and 18 deletions

View file

@ -160,11 +160,6 @@ const defaultOptions = {
value: 150,
kind: OptionKind.VIEWER,
},
renderer: {
/** @type {string} */
value: "canvas",
kind: OptionKind.VIEWER,
},
sidebarViewOnLoad: {
/** @type {number} */
value: -1,
@ -306,6 +301,11 @@ if (
value: navigator.language || "en-US",
kind: OptionKind.VIEWER,
};
defaultOptions.renderer = {
/** @type {string} */
value: "canvas",
kind: OptionKind.VIEWER + OptionKind.PREFERENCE,
};
defaultOptions.sandboxBundleSrc = {
/** @type {string} */
value:
@ -317,8 +317,6 @@ if (
defaultOptions.annotationEditorEnabled.compatibility =
compatibilityParams.annotationEditorEnabled;
defaultOptions.renderer.kind += OptionKind.PREFERENCE;
} else if (PDFJSDev.test("CHROME")) {
defaultOptions.disableTelemetry = {
/** @type {boolean} */