فهرست منبع

PDF.js version 1.3.146 - See mozilla/pdf.js@8ed369211af8c077f744b0e79b640b795a0fba43

Pdf Bot 9 سال پیش
والد
کامیت
54edbf6228
6فایلهای تغییر یافته به همراه106 افزوده شده و 12 حذف شده
  1. 1 1
      bower.json
  2. 50 2
      build/pdf.combined.js
  3. 31 2
      build/pdf.js
  4. 21 2
      build/pdf.worker.js
  5. 1 1
      package.json
  6. 2 4
      web/pdf_viewer.css

+ 1 - 1
bower.json

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

+ 50 - 2
build/pdf.combined.js

@@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
    typeof global !== 'undefined' ? global : this).PDFJS = {};
 }
 
-PDFJS.version = '1.3.144';
-PDFJS.build = 'd956177';
+PDFJS.version = '1.3.146';
+PDFJS.build = '8ed3692';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -15569,6 +15569,9 @@ AnnotationElementFactory.prototype =
       case AnnotationType.UNDERLINE:
         return new UnderlineAnnotationElement(parameters);
 
+      case AnnotationType.SQUIGGLY:
+        return new SquigglyAnnotationElement(parameters);
+
       case AnnotationType.STRIKEOUT:
         return new StrikeOutAnnotationElement(parameters);
 
@@ -16127,6 +16130,32 @@ var UnderlineAnnotationElement = (
   return UnderlineAnnotationElement;
 })();
 
+/**
+ * @class
+ * @alias SquigglyAnnotationElement
+ */
+var SquigglyAnnotationElement = (function SquigglyAnnotationElementClosure() {
+  function SquigglyAnnotationElement(parameters) {
+    AnnotationElement.call(this, parameters);
+  }
+
+  Util.inherit(SquigglyAnnotationElement, AnnotationElement, {
+    /**
+     * Render the squiggly annotation's HTML element in the empty container.
+     *
+     * @public
+     * @memberof SquigglyAnnotationElement
+     * @returns {HTMLSectionElement}
+     */
+    render: function SquigglyAnnotationElement_render() {
+      this.container.className = 'squigglyAnnotation';
+      return this.container;
+    }
+  });
+
+  return SquigglyAnnotationElement;
+})();
+
 /**
  * @class
  * @alias StrikeOutAnnotationElement
@@ -46638,6 +46667,9 @@ AnnotationFactory.prototype = /** @lends AnnotationFactory.prototype */ {
       case 'Underline':
         return new UnderlineAnnotation(parameters);
 
+      case 'Squiggly':
+        return new SquigglyAnnotation(parameters);
+
       case 'StrikeOut':
         return new StrikeOutAnnotation(parameters);
 
@@ -47347,6 +47379,22 @@ var UnderlineAnnotation = (function UnderlineAnnotationClosure() {
   return UnderlineAnnotation;
 })();
 
+var SquigglyAnnotation = (function SquigglyAnnotationClosure() {
+  function SquigglyAnnotation(parameters) {
+    Annotation.call(this, parameters);
+
+    this.data.annotationType = AnnotationType.SQUIGGLY;
+    this.data.hasHtml = true;
+
+    // PDF viewers completely ignore any border styles.
+    this.data.borderStyle.setWidth(0);
+  }
+
+  Util.inherit(SquigglyAnnotation, Annotation, {});
+
+  return SquigglyAnnotation;
+})();
+
 var StrikeOutAnnotation = (function StrikeOutAnnotationClosure() {
   function StrikeOutAnnotation(parameters) {
     Annotation.call(this, parameters);

+ 31 - 2
build/pdf.js

@@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
    typeof global !== 'undefined' ? global : this).PDFJS = {};
 }
 
-PDFJS.version = '1.3.144';
-PDFJS.build = 'd956177';
+PDFJS.version = '1.3.146';
+PDFJS.build = '8ed3692';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -1849,6 +1849,9 @@ AnnotationElementFactory.prototype =
       case AnnotationType.UNDERLINE:
         return new UnderlineAnnotationElement(parameters);
 
+      case AnnotationType.SQUIGGLY:
+        return new SquigglyAnnotationElement(parameters);
+
       case AnnotationType.STRIKEOUT:
         return new StrikeOutAnnotationElement(parameters);
 
@@ -2407,6 +2410,32 @@ var UnderlineAnnotationElement = (
   return UnderlineAnnotationElement;
 })();
 
+/**
+ * @class
+ * @alias SquigglyAnnotationElement
+ */
+var SquigglyAnnotationElement = (function SquigglyAnnotationElementClosure() {
+  function SquigglyAnnotationElement(parameters) {
+    AnnotationElement.call(this, parameters);
+  }
+
+  Util.inherit(SquigglyAnnotationElement, AnnotationElement, {
+    /**
+     * Render the squiggly annotation's HTML element in the empty container.
+     *
+     * @public
+     * @memberof SquigglyAnnotationElement
+     * @returns {HTMLSectionElement}
+     */
+    render: function SquigglyAnnotationElement_render() {
+      this.container.className = 'squigglyAnnotation';
+      return this.container;
+    }
+  });
+
+  return SquigglyAnnotationElement;
+})();
+
 /**
  * @class
  * @alias StrikeOutAnnotationElement

+ 21 - 2
build/pdf.worker.js

@@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
    typeof global !== 'undefined' ? global : this).PDFJS = {};
 }
 
-PDFJS.version = '1.3.144';
-PDFJS.build = 'd956177';
+PDFJS.version = '1.3.146';
+PDFJS.build = '8ed3692';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -38885,6 +38885,9 @@ AnnotationFactory.prototype = /** @lends AnnotationFactory.prototype */ {
       case 'Underline':
         return new UnderlineAnnotation(parameters);
 
+      case 'Squiggly':
+        return new SquigglyAnnotation(parameters);
+
       case 'StrikeOut':
         return new StrikeOutAnnotation(parameters);
 
@@ -39594,6 +39597,22 @@ var UnderlineAnnotation = (function UnderlineAnnotationClosure() {
   return UnderlineAnnotation;
 })();
 
+var SquigglyAnnotation = (function SquigglyAnnotationClosure() {
+  function SquigglyAnnotation(parameters) {
+    Annotation.call(this, parameters);
+
+    this.data.annotationType = AnnotationType.SQUIGGLY;
+    this.data.hasHtml = true;
+
+    // PDF viewers completely ignore any border styles.
+    this.data.borderStyle.setWidth(0);
+  }
+
+  Util.inherit(SquigglyAnnotation, Annotation, {});
+
+  return SquigglyAnnotation;
+})();
+
 var StrikeOutAnnotation = (function StrikeOutAnnotationClosure() {
   function StrikeOutAnnotation(parameters) {
     Annotation.call(this, parameters);

+ 1 - 1
package.json

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

+ 2 - 4
web/pdf_viewer.css

@@ -138,10 +138,8 @@
   padding-top: 0.2em;
 }
 
-.annotationLayer .underlineAnnotation {
-  cursor: pointer;
-}
-
+.annotationLayer .underlineAnnotation,
+.annotationLayer .squigglyAnnotation,
 .annotationLayer .strikeoutAnnotation {
   cursor: pointer;
 }