Skip to content

Commit

Permalink
Merge pull request #15263 from Snuffleupagus/issue-15262
Browse files Browse the repository at this point in the history
Always set a border-radius for RadioButton annotations (issue 15262)
  • Loading branch information
Snuffleupagus authored Aug 2, 2022
2 parents 803e7af + 899fc29 commit 159f853
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/display/annotation_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ class AnnotationElement {
if (horizontalRadius > 0 || verticalRadius > 0) {
const radius = `calc(${horizontalRadius}px * var(--scale-factor)) / calc(${verticalRadius}px * var(--scale-factor))`;
container.style.borderRadius = radius;
} else if (this instanceof RadioButtonWidgetAnnotationElement) {
const radius = `calc(${width}px * var(--scale-factor)) / calc(${height}px * var(--scale-factor))`;
container.style.borderRadius = radius;
}

switch (data.borderStyle.style) {
Expand Down
1 change: 1 addition & 0 deletions test/pdfs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@
!issue11442_reduced.pdf
!issue11549_reduced.pdf
!issue8097_reduced.pdf
!issue15262.pdf
!bug1743245.pdf
!quadpoints.pdf
!transparent.pdf
Expand Down
Binary file added test/pdfs/issue15262.pdf
Binary file not shown.
7 changes: 7 additions & 0 deletions test/test_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2708,6 +2708,13 @@
"lastPage": 33,
"type": "eq"
},
{ "id": "issue15262",
"file": "pdfs/issue15262.pdf",
"md5": "f33f73848cea3c7034457653d5cfb9be",
"rounds": 1,
"type": "eq",
"forms": true
},
{ "id": "smaskdim",
"file": "pdfs/smaskdim.pdf",
"md5": "de80aeca7cbf79940189fd34d59671ee",
Expand Down

0 comments on commit 159f853

Please sign in to comment.