Merge pull request #12998 from Snuffleupagus/renderInteractiveForms-defaults

Simplify the default value handling of `renderInteractiveForms` in the viewer components
This commit is contained in:
Tim van der Meij 2021-02-17 20:37:03 +01:00 committed by GitHub
commit 1d3af89cae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 12 deletions

View File

@ -2012,10 +2012,7 @@ class AnnotationLayer {
linkService: parameters.linkService, linkService: parameters.linkService,
downloadManager: parameters.downloadManager, downloadManager: parameters.downloadManager,
imageResourcesPath: parameters.imageResourcesPath || "", imageResourcesPath: parameters.imageResourcesPath || "",
renderInteractiveForms: renderInteractiveForms: parameters.renderInteractiveForms !== false,
typeof parameters.renderInteractiveForms === "boolean"
? parameters.renderInteractiveForms
: true,
svgFactory: new DOMSVGFactory(), svgFactory: new DOMSVGFactory(),
annotationStorage: annotationStorage:
parameters.annotationStorage || new AnnotationStorage(), parameters.annotationStorage || new AnnotationStorage(),

View File

@ -188,10 +188,7 @@ class BaseViewer {
? options.textLayerMode ? options.textLayerMode
: TextLayerMode.ENABLE; : TextLayerMode.ENABLE;
this.imageResourcesPath = options.imageResourcesPath || ""; this.imageResourcesPath = options.imageResourcesPath || "";
this.renderInteractiveForms = this.renderInteractiveForms = options.renderInteractiveForms !== false;
typeof options.renderInteractiveForms === "boolean"
? options.renderInteractiveForms
: true;
this.enablePrintAutoRotate = options.enablePrintAutoRotate || false; this.enablePrintAutoRotate = options.enablePrintAutoRotate || false;
this.renderer = options.renderer || RendererType.CANVAS; this.renderer = options.renderer || RendererType.CANVAS;
this.enableWebGL = options.enableWebGL || false; this.enableWebGL = options.enableWebGL || false;

View File

@ -94,10 +94,7 @@ class PDFPageView {
? options.textLayerMode ? options.textLayerMode
: TextLayerMode.ENABLE; : TextLayerMode.ENABLE;
this.imageResourcesPath = options.imageResourcesPath || ""; this.imageResourcesPath = options.imageResourcesPath || "";
this.renderInteractiveForms = this.renderInteractiveForms = options.renderInteractiveForms !== false;
typeof options.renderInteractiveForms === "boolean"
? options.renderInteractiveForms
: true;
this.useOnlyCssZoom = options.useOnlyCssZoom || false; this.useOnlyCssZoom = options.useOnlyCssZoom || false;
this.maxCanvasPixels = options.maxCanvasPixels || MAX_CANVAS_PIXELS; this.maxCanvasPixels = options.maxCanvasPixels || MAX_CANVAS_PIXELS;