mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Introduce some logical assignment in the src/core/
folder
This commit is contained in:
parent
317abd6d07
commit
d950b91c4e
20 changed files with 62 additions and 103 deletions
|
@ -1556,11 +1556,10 @@ class WidgetAnnotation extends Annotation {
|
|||
|
||||
this.setDefaultAppearance(params);
|
||||
|
||||
data.hasAppearance =
|
||||
(this._needAppearances &&
|
||||
data.fieldValue !== undefined &&
|
||||
data.fieldValue !== null) ||
|
||||
data.hasAppearance;
|
||||
data.hasAppearance ||=
|
||||
this._needAppearances &&
|
||||
data.fieldValue !== undefined &&
|
||||
data.fieldValue !== null;
|
||||
|
||||
const fieldType = getInheritableProperty({ dict, key: "FT" });
|
||||
data.fieldType = fieldType instanceof Name ? fieldType.name : null;
|
||||
|
@ -1808,7 +1807,7 @@ class WidgetAnnotation extends Annotation {
|
|||
if (!this._hasValueFromXFA && rotation === undefined) {
|
||||
return null;
|
||||
}
|
||||
value = value || this.data.fieldValue;
|
||||
value ||= this.data.fieldValue;
|
||||
}
|
||||
|
||||
// Value can be an array (with choice list and multiple selections)
|
||||
|
@ -3472,7 +3471,7 @@ class LinkAnnotation extends Annotation {
|
|||
}
|
||||
|
||||
// The color entry for a link annotation is the color of the border.
|
||||
this.data.borderColor = this.data.borderColor || this.data.color;
|
||||
this.data.borderColor ||= this.data.color;
|
||||
|
||||
Catalog.parseDestDictionary({
|
||||
destDict: params.dict,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue