mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
[Annotations] Add support for printing/saving choice list with multiple selections
- it aims to fix issue #12189.
This commit is contained in:
parent
0dd6bc9a85
commit
ad3fb71a02
7 changed files with 355 additions and 33 deletions
|
@ -233,7 +233,11 @@ class Field extends PDFObject {
|
|||
if (this._isChoice) {
|
||||
if (this.multipleSelection) {
|
||||
const values = new Set(value);
|
||||
this._currentValueIndices.length = 0;
|
||||
if (Array.isArray(this._currentValueIndices)) {
|
||||
this._currentValueIndices.length = 0;
|
||||
} else {
|
||||
this._currentValueIndices = [];
|
||||
}
|
||||
this._items.forEach(({ displayValue }, i) => {
|
||||
if (values.has(displayValue)) {
|
||||
this._currentValueIndices.push(i);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue