소스 검색

PDF.js version 1.6.475 - See mozilla/pdf.js@857e360a4245adb4eabc5c9ba6157ba533ea525c

Pdf Bot 8 년 전
부모
커밋
ed364bd160
7개의 변경된 파일15개의 추가작업 그리고 15개의 파일을 삭제
  1. 1 1
      bower.json
  2. 2 2
      build/pdf.combined.js
  3. 2 2
      build/pdf.js
  4. 0 0
      build/pdf.min.js
  5. 2 2
      build/pdf.worker.js
  6. 1 1
      package.json
  7. 7 7
      web/pdf_viewer.js

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.6.473",
+  "version": "1.6.475",
   "main": [
     "build/pdf.js",
     "build/pdf.worker.js"

+ 2 - 2
build/pdf.combined.js

@@ -23,8 +23,8 @@
  }
 }(this, function (exports) {
  'use strict';
- var pdfjsVersion = '1.6.473';
- var pdfjsBuild = 'a47fc2f';
+ var pdfjsVersion = '1.6.475';
+ var pdfjsBuild = '857e360';
  var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
  var pdfjsLibs = {};
  (function pdfjsWrapper() {

+ 2 - 2
build/pdf.js

@@ -23,8 +23,8 @@
  }
 }(this, function (exports) {
  'use strict';
- var pdfjsVersion = '1.6.473';
- var pdfjsBuild = 'a47fc2f';
+ var pdfjsVersion = '1.6.475';
+ var pdfjsBuild = '857e360';
  var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
  var pdfjsLibs = {};
  (function pdfjsWrapper() {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
build/pdf.min.js


+ 2 - 2
build/pdf.worker.js

@@ -23,8 +23,8 @@
  }
 }(this, function (exports) {
  'use strict';
- var pdfjsVersion = '1.6.473';
- var pdfjsBuild = 'a47fc2f';
+ var pdfjsVersion = '1.6.475';
+ var pdfjsBuild = '857e360';
  var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
  var pdfjsLibs = {};
  (function pdfjsWrapper() {

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.6.473",
+  "version": "1.6.475",
   "main": "build/pdf.js",
   "description": "Generic build of Mozilla's PDF.js library.",
   "keywords": [

+ 7 - 7
web/pdf_viewer.js

@@ -1736,7 +1736,7 @@
      this.annotationLayerFactory = annotationLayerFactory;
      this.renderer = options.renderer || RendererType.CANVAS;
      this.paintTask = null;
-     this.paintedViewport = null;
+     this.paintedViewportMap = new WeakMap();
      this.renderingState = RenderingStates.INITIAL;
      this.resume = null;
      this.error = null;
@@ -1792,16 +1792,15 @@
        this.annotationLayer = null;
       }
       if (this.canvas && !currentZoomLayerNode) {
+       this.paintedViewportMap.delete(this.canvas);
        this.canvas.width = 0;
        this.canvas.height = 0;
        delete this.canvas;
       }
       if (this.svg) {
+       this.paintedViewportMap.delete(this.svg);
        delete this.svg;
       }
-      if (!currentZoomLayerNode) {
-       this.paintedViewport = null;
-      }
       this.loadingIconDiv = document.createElement('div');
       this.loadingIconDiv.className = 'loadingIcon';
       div.appendChild(this.loadingIconDiv);
@@ -1876,7 +1875,7 @@
       var div = this.div;
       target.style.width = target.parentNode.style.width = div.style.width = Math.floor(width) + 'px';
       target.style.height = target.parentNode.style.height = div.style.height = Math.floor(height) + 'px';
-      var relativeRotation = this.viewport.rotation - this.paintedViewport.rotation;
+      var relativeRotation = this.viewport.rotation - this.paintedViewportMap.get(target).rotation;
       var absRotation = Math.abs(relativeRotation);
       var scaleX = 1, scaleY = 1;
       if (absRotation === 90 || absRotation === 270) {
@@ -1994,6 +1993,7 @@
        }
        if (self.zoomLayer) {
         var zoomLayerCanvas = self.zoomLayer.firstChild;
+        self.paintedViewportMap.delete(zoomLayerCanvas);
         zoomLayerCanvas.width = 0;
         zoomLayerCanvas.height = 0;
         if (div.contains(self.zoomLayer)) {
@@ -2101,7 +2101,7 @@
       canvas.height = roundToDivide(viewport.height * outputScale.sy, sfy[0]);
       canvas.style.width = roundToDivide(viewport.width, sfx[1]) + 'px';
       canvas.style.height = roundToDivide(viewport.height, sfy[1]) + 'px';
-      this.paintedViewport = viewport;
+      this.paintedViewportMap.set(canvas, viewport);
       var transform = !outputScale.scaled ? null : [
        outputScale.sx,
        0,
@@ -2151,7 +2151,7 @@
        return svgGfx.getSVG(opList, actualSizeViewport).then(function (svg) {
         ensureNotCancelled();
         self.svg = svg;
-        self.paintedViewport = actualSizeViewport;
+        self.paintedViewportMap.set(svg, actualSizeViewport);
         svg.style.width = wrapper.style.width;
         svg.style.height = wrapper.style.height;
         self.renderingState = RenderingStates.FINISHED;

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.