Call WidgetAnnotation._getTextWidth
correctly from the ChoiceWidgetAnnotation
-class (PR 14720 follow-up)
In the "no fontSize available" code-path, in the `ChoiceWidgetAnnotation._getAppearance` method, we don't provide the necessary second argument when calling the `_getTextWidth`-method which will cause errors to be thrown.
This commit is contained in:
parent
b5cad9be03
commit
66bbc0e7ee
@ -2706,7 +2706,7 @@ class ChoiceWidgetAnnotation extends WidgetAnnotation {
|
||||
let lineWidth = -1;
|
||||
let value;
|
||||
for (const { displayValue } of this.data.options) {
|
||||
const width = this._getTextWidth(displayValue);
|
||||
const width = this._getTextWidth(displayValue, font);
|
||||
if (width > lineWidth) {
|
||||
lineWidth = width;
|
||||
value = displayValue;
|
||||
|
Loading…
Reference in New Issue
Block a user