mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Simplify the default value handling of renderInteractiveForms
in the viewer components
I happened to look at this code, and I can't for the life of me figure out why I didn't just implement it like this patch in the first place (since the current format feels overly verbose).
This commit is contained in:
parent
952bc08ec0
commit
0a28e51e40
3 changed files with 3 additions and 12 deletions
|
@ -188,10 +188,7 @@ class BaseViewer {
|
|||
? options.textLayerMode
|
||||
: TextLayerMode.ENABLE;
|
||||
this.imageResourcesPath = options.imageResourcesPath || "";
|
||||
this.renderInteractiveForms =
|
||||
typeof options.renderInteractiveForms === "boolean"
|
||||
? options.renderInteractiveForms
|
||||
: true;
|
||||
this.renderInteractiveForms = options.renderInteractiveForms !== false;
|
||||
this.enablePrintAutoRotate = options.enablePrintAutoRotate || false;
|
||||
this.renderer = options.renderer || RendererType.CANVAS;
|
||||
this.enableWebGL = options.enableWebGL || false;
|
||||
|
|
|
@ -94,10 +94,7 @@ class PDFPageView {
|
|||
? options.textLayerMode
|
||||
: TextLayerMode.ENABLE;
|
||||
this.imageResourcesPath = options.imageResourcesPath || "";
|
||||
this.renderInteractiveForms =
|
||||
typeof options.renderInteractiveForms === "boolean"
|
||||
? options.renderInteractiveForms
|
||||
: true;
|
||||
this.renderInteractiveForms = options.renderInteractiveForms !== false;
|
||||
this.useOnlyCssZoom = options.useOnlyCssZoom || false;
|
||||
this.maxCanvasPixels = options.maxCanvasPixels || MAX_CANVAS_PIXELS;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue