1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Merge pull request #12108 from calixteman/radio

Add support for radios printing
This commit is contained in:
Tim van der Meij 2020-08-02 14:47:46 +02:00 committed by GitHub
commit 5a66c56eca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 202 additions and 62 deletions

View file

@ -1078,16 +1078,19 @@ class ButtonWidgetAnnotation extends WidgetAnnotation {
if (!isDict(appearanceStates)) {
return;
}
const normalAppearanceState = appearanceStates.get("N");
if (!isDict(normalAppearanceState)) {
const normalAppearance = appearanceStates.get("N");
if (!isDict(normalAppearance)) {
return;
}
for (const key of normalAppearanceState.getKeys()) {
for (const key of normalAppearance.getKeys()) {
if (key !== "Off") {
this.data.buttonValue = key;
break;
}
}
this.checkedAppearance = normalAppearance.get(this.data.buttonValue);
this.uncheckedAppearance = normalAppearance.get("Off") || null;
}
_processPushButton(params) {