1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

move hasHtml to AnnotationElement

This commit is contained in:
Xiliang Chen 2016-01-12 16:44:44 +13:00
parent acf74d40b1
commit e42da0f5e9
2 changed files with 23 additions and 23 deletions

View file

@ -620,7 +620,6 @@ var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() {
WidgetAnnotation.call(this, params);
this.data.textAlignment = Util.getInheritableProperty(params.dict, 'Q');
this.data.hasHtml = !this.data.hasAppearance && !!this.data.fieldValue;
}
Util.inherit(TextWidgetAnnotation, WidgetAnnotation, {
@ -658,7 +657,6 @@ var TextAnnotation = (function TextAnnotationClosure() {
Annotation.call(this, parameters);
this.data.annotationType = AnnotationType.TEXT;
this.data.hasHtml = true;
var dict = parameters.dict;
if (this.data.hasAppearance) {
@ -680,7 +678,6 @@ var TextAnnotation = (function TextAnnotationClosure() {
// must create its own popup.
this.data.title = stringToPDFString(dict.get('T') || '');
this.data.contents = stringToPDFString(dict.get('Contents') || '');
this.data.hasHtml = (this.data.title || this.data.contents);
}
}
@ -696,7 +693,6 @@ var LinkAnnotation = (function LinkAnnotationClosure() {
var dict = params.dict;
var data = this.data;
data.annotationType = AnnotationType.LINK;
data.hasHtml = true;
var action = dict.get('A');
if (action && isDict(action)) {
@ -789,8 +785,6 @@ var PopupAnnotation = (function PopupAnnotationClosure() {
this.setColor(parentItem.get('C'));
this.data.color = this.color;
}
this.data.hasHtml = (this.data.title || this.data.contents);
}
Util.inherit(PopupAnnotation, Annotation, {});
@ -803,7 +797,6 @@ var HighlightAnnotation = (function HighlightAnnotationClosure() {
Annotation.call(this, parameters);
this.data.annotationType = AnnotationType.HIGHLIGHT;
this.data.hasHtml = true;
// PDF viewers completely ignore any border styles.
this.data.borderStyle.setWidth(0);
@ -819,7 +812,6 @@ var UnderlineAnnotation = (function UnderlineAnnotationClosure() {
Annotation.call(this, parameters);
this.data.annotationType = AnnotationType.UNDERLINE;
this.data.hasHtml = true;
// PDF viewers completely ignore any border styles.
this.data.borderStyle.setWidth(0);
@ -835,7 +827,6 @@ var SquigglyAnnotation = (function SquigglyAnnotationClosure() {
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);
@ -851,7 +842,6 @@ var StrikeOutAnnotation = (function StrikeOutAnnotationClosure() {
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);