mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue