diff --git a/bower.json b/bower.json index ac57565ad..ccdfb5e18 100644 --- a/bower.json +++ b/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" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index 2ad3db07e..2db8e27cd 100644 --- a/build/pdf.combined.js +++ b/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); diff --git a/build/pdf.js b/build/pdf.js index dcb6308e5..83a323ab8 100644 --- a/build/pdf.js +++ b/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 diff --git a/build/pdf.worker.js b/build/pdf.worker.js index 7867f38c2..5b76a4fbb 100644 --- a/build/pdf.worker.js +++ b/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); diff --git a/package.json b/package.json index f5753f906..6e6ba0447 100644 --- a/package.json +++ b/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": [ diff --git a/web/pdf_viewer.css b/web/pdf_viewer.css index b13230e84..654191abb 100644 --- a/web/pdf_viewer.css +++ b/web/pdf_viewer.css @@ -138,10 +138,8 @@ padding-top: 0.2em; } -.annotationLayer .underlineAnnotation { - cursor: pointer; -} - +.annotationLayer .underlineAnnotation, +.annotationLayer .squigglyAnnotation, .annotationLayer .strikeoutAnnotation { cursor: pointer; }