浏览代码

预览适合页宽

fenghaifu 4 年之前
父节点
当前提交
9ea4722169
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/pdfjs/web/viewer.js

+ 2 - 2
lib/pdfjs/web/viewer.js

@@ -45,7 +45,7 @@ var mozL10n = document.mozL10n || document.webL10n;
 
 
 var CSS_UNITS = 96.0 / 72.0;
-var DEFAULT_SCALE_VALUE = 1.0;
+var DEFAULT_SCALE_VALUE = 'page-width';
 var DEFAULT_SCALE = 1.0;
 var UNKNOWN_SCALE = 0;
 var MAX_AUTO_SCALE = 1.25;
@@ -3574,7 +3574,7 @@ var PDFPageView = (function PDFPageViewClosure() {
     this.renderingId = 'page' + id;
 
     this.rotation = 0;
-    this.scale = 'page-width';//scale || DEFAULT_SCALE;
+    this.scale = scale || DEFAULT_SCALE;
     this.viewport = defaultViewport;
     this.pdfPageRotate = defaultViewport.rotation;
     this.hasRestrictedScaling = false;