From d61a46981bbabf90422bff98b5c2caa65216a19e Mon Sep 17 00:00:00 2001 From: Pdf Bot Date: Wed, 30 Dec 2015 14:07:43 +0000 Subject: [PATCH] PDF.js version 1.3.144 - See mozilla/pdf.js@d956177482a7b0fc3bf901d348423a21e67fe2bb --- bower.json | 2 +- build/pdf.combined.js | 53 +++++++++++++++++++++++++++++++++++++++++-- build/pdf.js | 34 +++++++++++++++++++++++++-- build/pdf.worker.js | 23 +++++++++++++++++-- package.json | 2 +- web/pdf_viewer.css | 4 ++++ 6 files changed, 110 insertions(+), 8 deletions(-) diff --git a/bower.json b/bower.json index 957f68110..ac57565ad 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.3.142", + "version": "1.3.144", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index ecb66d105..2ad3db07e 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.142'; -PDFJS.build = 'e8db825'; +PDFJS.version = '1.3.144'; +PDFJS.build = 'd956177'; (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.STRIKEOUT: + return new StrikeOutAnnotationElement(parameters); + default: throw new Error('Unimplemented annotation type "' + subtype + '"'); } @@ -16124,6 +16127,33 @@ var UnderlineAnnotationElement = ( return UnderlineAnnotationElement; })(); +/** + * @class + * @alias StrikeOutAnnotationElement + */ +var StrikeOutAnnotationElement = ( + function StrikeOutAnnotationElementClosure() { + function StrikeOutAnnotationElement(parameters) { + AnnotationElement.call(this, parameters); + } + + Util.inherit(StrikeOutAnnotationElement, AnnotationElement, { + /** + * Render the strikeout annotation's HTML element in the empty container. + * + * @public + * @memberof StrikeOutAnnotationElement + * @returns {HTMLSectionElement} + */ + render: function StrikeOutAnnotationElement_render() { + this.container.className = 'strikeoutAnnotation'; + return this.container; + } + }); + + return StrikeOutAnnotationElement; +})(); + /** * @typedef {Object} AnnotationLayerParameters * @property {PageViewport} viewport @@ -46608,6 +46638,9 @@ AnnotationFactory.prototype = /** @lends AnnotationFactory.prototype */ { case 'Underline': return new UnderlineAnnotation(parameters); + case 'StrikeOut': + return new StrikeOutAnnotation(parameters); + default: warn('Unimplemented annotation type "' + subtype + '", ' + 'falling back to base annotation'); @@ -47314,6 +47347,22 @@ var UnderlineAnnotation = (function UnderlineAnnotationClosure() { return UnderlineAnnotation; })(); +var StrikeOutAnnotation = (function StrikeOutAnnotationClosure() { + function StrikeOutAnnotation(parameters) { + Annotation.call(this, parameters); + + this.data.annotationType = AnnotationType.STRIKEOUT; + this.data.hasHtml = true; + + // PDF viewers completely ignore any border styles. + this.data.borderStyle.setWidth(0); + } + + Util.inherit(StrikeOutAnnotation, Annotation, {}); + + return StrikeOutAnnotation; +})(); + exports.Annotation = Annotation; exports.AnnotationBorderStyle = AnnotationBorderStyle; exports.AnnotationFactory = AnnotationFactory; diff --git a/build/pdf.js b/build/pdf.js index 762272e2e..dcb6308e5 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.142'; -PDFJS.build = 'e8db825'; +PDFJS.version = '1.3.144'; +PDFJS.build = 'd956177'; (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.STRIKEOUT: + return new StrikeOutAnnotationElement(parameters); + default: throw new Error('Unimplemented annotation type "' + subtype + '"'); } @@ -2404,6 +2407,33 @@ var UnderlineAnnotationElement = ( return UnderlineAnnotationElement; })(); +/** + * @class + * @alias StrikeOutAnnotationElement + */ +var StrikeOutAnnotationElement = ( + function StrikeOutAnnotationElementClosure() { + function StrikeOutAnnotationElement(parameters) { + AnnotationElement.call(this, parameters); + } + + Util.inherit(StrikeOutAnnotationElement, AnnotationElement, { + /** + * Render the strikeout annotation's HTML element in the empty container. + * + * @public + * @memberof StrikeOutAnnotationElement + * @returns {HTMLSectionElement} + */ + render: function StrikeOutAnnotationElement_render() { + this.container.className = 'strikeoutAnnotation'; + return this.container; + } + }); + + return StrikeOutAnnotationElement; +})(); + /** * @typedef {Object} AnnotationLayerParameters * @property {PageViewport} viewport diff --git a/build/pdf.worker.js b/build/pdf.worker.js index dbe48b181..7867f38c2 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.142'; -PDFJS.build = 'e8db825'; +PDFJS.version = '1.3.144'; +PDFJS.build = 'd956177'; (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 'StrikeOut': + return new StrikeOutAnnotation(parameters); + default: warn('Unimplemented annotation type "' + subtype + '", ' + 'falling back to base annotation'); @@ -39591,6 +39594,22 @@ var UnderlineAnnotation = (function UnderlineAnnotationClosure() { return UnderlineAnnotation; })(); +var StrikeOutAnnotation = (function StrikeOutAnnotationClosure() { + function StrikeOutAnnotation(parameters) { + Annotation.call(this, parameters); + + this.data.annotationType = AnnotationType.STRIKEOUT; + this.data.hasHtml = true; + + // PDF viewers completely ignore any border styles. + this.data.borderStyle.setWidth(0); + } + + Util.inherit(StrikeOutAnnotation, Annotation, {}); + + return StrikeOutAnnotation; +})(); + exports.Annotation = Annotation; exports.AnnotationBorderStyle = AnnotationBorderStyle; exports.AnnotationFactory = AnnotationFactory; diff --git a/package.json b/package.json index 31ea2bca5..f5753f906 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.3.142", + "version": "1.3.144", "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 96e09ce08..b13230e84 100644 --- a/web/pdf_viewer.css +++ b/web/pdf_viewer.css @@ -142,6 +142,10 @@ cursor: pointer; } +.annotationLayer .strikeoutAnnotation { + cursor: pointer; +} + .pdfViewer .canvasWrapper { overflow: hidden; }