diff --git a/src/core/annotation.js b/src/core/annotation.js index 6a4c61011..efe47a178 100644 --- a/src/core/annotation.js +++ b/src/core/annotation.js @@ -15,7 +15,7 @@ * limitations under the License. */ /* globals PDFJS, Util, isDict, isName, stringToPDFString, warn, Dict, Stream, - stringToBytes, assert, Promise, isArray, ObjectLoader, OperatorList, + stringToBytes, Promise, isArray, ObjectLoader, OperatorList, isValidUrl, OPS, createPromiseCapability, AnnotationType, stringToUTF8String, AnnotationBorderStyleType */ @@ -570,21 +570,9 @@ var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() { return TextWidgetAnnotation; })(); -var InteractiveAnnotation = (function InteractiveAnnotationClosure() { - function InteractiveAnnotation(params) { - Annotation.call(this, params); - - this.data.hasHtml = true; - } - - Util.inherit(InteractiveAnnotation, Annotation, { }); - - return InteractiveAnnotation; -})(); - var TextAnnotation = (function TextAnnotationClosure() { function TextAnnotation(params) { - InteractiveAnnotation.call(this, params); + Annotation.call(this, params); var dict = params.dict; var data = this.data; @@ -594,6 +582,7 @@ var TextAnnotation = (function TextAnnotationClosure() { data.annotationType = AnnotationType.TEXT; data.content = stringToPDFString(content || ''); data.title = stringToPDFString(title || ''); + data.hasHtml = true; if (data.hasAppearance) { data.name = 'NoIcon'; @@ -608,18 +597,19 @@ var TextAnnotation = (function TextAnnotationClosure() { } } - Util.inherit(TextAnnotation, InteractiveAnnotation, { }); + Util.inherit(TextAnnotation, Annotation, { }); return TextAnnotation; })(); var LinkAnnotation = (function LinkAnnotationClosure() { function LinkAnnotation(params) { - InteractiveAnnotation.call(this, params); + Annotation.call(this, params); var dict = params.dict; var data = this.data; data.annotationType = AnnotationType.LINK; + data.hasHtml = true; var action = dict.get('A'); if (action && isDict(action)) { @@ -683,7 +673,7 @@ var LinkAnnotation = (function LinkAnnotationClosure() { return url; } - Util.inherit(LinkAnnotation, InteractiveAnnotation, { }); + Util.inherit(LinkAnnotation, Annotation, { }); return LinkAnnotation; })();