dist/ngx-document-scanner/bundles/ngx-document-scanner.umd.js
function (width, height) {
                /** @type {?} */
                var ratio = width / height;
                /** @type {?} */
                var maxWidth = this.screenDimensions.width > this.maxPreviewWidth ?
                    this.maxPreviewWidth : this.screenDimensions.width - 40;
                /** @type {?} */
                var maxHeight = this.screenDimensions.height - 240;
                /** @type {?} */
                var calculated = {
                    width: maxWidth,
                    height: Math.round(maxWidth / ratio),
                    ratio: ratio
                };
                if (calculated.height > maxHeight) {
                    calculated.height = maxHeight;
                    calculated.width = Math.round(maxHeight * ratio);
                }
                return calculated;
            }
function (width, height) {
                /** @type {?} */
                var ratio = width / height;
                /** @type {?} */
                var maxWidth = this.screenDimensions.width > this.maxPreviewWidth ?
                    this.maxPreviewWidth : this.screenDimensions.width - 40;
                /** @type {?} */
                var maxHeight = this.screenDimensions.height - 240;
                /** @type {?} */
                var calculated = {
                    width: maxWidth,
                    height: Math.round(maxWidth / ratio),
                    ratio: ratio
                };
                if (calculated.height > maxHeight) {
                    calculated.height = maxHeight;
                    calculated.width = Math.round(maxHeight * ratio);
                }
                return calculated;
            }
function ( width , height ) { /** @type {?} */ var ratio = width / height ; /** @type {?} */ var maxWidth = this . screenDimensions . width > this . maxPreviewWidth ? this . maxPreviewWidth : this . screenDimensions . width - 40 ; /** @type {?} */ var maxHeight = this . screenDimensions . height - 240 ; /** @type {?} */ var calculated = { width : maxWidth , height : Math . round ( maxWidth / ratio ) , ratio : ratio } ; if ( calculated . height > maxHeight ) { calculated . height = maxHeight ; calculated . width = Math . round ( maxHeight * ratio ) ; } return calculated ; }
calculate dimensions of the preview canvas
@private
@param {?} width
@param {?} height
@return {?}
calculate dimensions of the preview canvas