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 #16804 from Snuffleupagus/issue-16800

Take fill-alpha into account with default icons for FileAttachment annotations (issue 16800)
This commit is contained in:
Jonas Jenwald 2023-08-08 16:39:37 +02:00 committed by GitHub
commit 2e9f2e630c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 7 deletions

View file

@ -4653,6 +4653,12 @@ class FileAttachmentAnnotation extends MarkupAnnotation {
const name = dict.get("Name");
this.data.name =
name instanceof Name ? stringToPDFString(name.name) : "PushPin";
const fillAlpha = dict.get("ca");
this.data.fillAlpha =
typeof fillAlpha === "number" && fillAlpha >= 0 && fillAlpha <= 1
? fillAlpha
: null;
}
}