mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
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:
parent
c3d0858062
commit
df79b18a31
3 changed files with 15 additions and 18 deletions
|
@ -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} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue