mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 10:15:37 +02:00
Use text widget annotation appearance stream if it is available.
This commit is contained in:
parent
79c57dc04e
commit
feafb394d6
1 changed files with 5 additions and 1 deletions
|
@ -100,6 +100,7 @@ var Annotation = (function AnnotationClosure() {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.appearance = getDefaultAppearance(dict);
|
this.appearance = getDefaultAppearance(dict);
|
||||||
|
data.hasAppearance = !!this.appearance;
|
||||||
}
|
}
|
||||||
|
|
||||||
Annotation.prototype = {
|
Annotation.prototype = {
|
||||||
|
@ -406,7 +407,7 @@ var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() {
|
||||||
var parent = WidgetAnnotation.prototype;
|
var parent = WidgetAnnotation.prototype;
|
||||||
Util.inherit(TextWidgetAnnotation, WidgetAnnotation, {
|
Util.inherit(TextWidgetAnnotation, WidgetAnnotation, {
|
||||||
hasHtml: function TextWidgetAnnotation_hasHtml() {
|
hasHtml: function TextWidgetAnnotation_hasHtml() {
|
||||||
return !!this.data.fieldValue;
|
return !this.data.hasAppearance && !!this.data.fieldValue;
|
||||||
},
|
},
|
||||||
|
|
||||||
getHtmlElement: function TextWidgetAnnotation_getHtmlElement(commonObjs) {
|
getHtmlElement: function TextWidgetAnnotation_getHtmlElement(commonObjs) {
|
||||||
|
@ -434,6 +435,9 @@ var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() {
|
||||||
},
|
},
|
||||||
|
|
||||||
getOperatorList: function TextWidgetAnnotation_getOperatorList(evaluator) {
|
getOperatorList: function TextWidgetAnnotation_getOperatorList(evaluator) {
|
||||||
|
if (this.appearance) {
|
||||||
|
return Annotation.prototype.getOperatorList.call(this, evaluator);
|
||||||
|
}
|
||||||
|
|
||||||
var promise = new Promise();
|
var promise = new Promise();
|
||||||
var opList = new OperatorList();
|
var opList = new OperatorList();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue