Skip to content

Commit 364a8aa

Browse files
committed
Merge remote-tracking branch 'origin/pr/645'
2 parents 46078ac + 90f9eeb commit 364a8aa

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/nodeparser.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -617,14 +617,14 @@ function calculateCurvePoints(bounds, borderRadius, borders) {
617617
width = bounds.width,
618618
height = bounds.height,
619619

620-
tlh = borderRadius[0][0],
621-
tlv = borderRadius[0][1],
622-
trh = borderRadius[1][0],
623-
trv = borderRadius[1][1],
624-
brh = borderRadius[2][0],
625-
brv = borderRadius[2][1],
626-
blh = borderRadius[3][0],
627-
blv = borderRadius[3][1];
620+
tlh = borderRadius[0][0] < width / 2 ? borderRadius[0][0] : width / 2,
621+
tlv = borderRadius[0][1] < height / 2 ? borderRadius[0][1] : height / 2,
622+
trh = borderRadius[1][0] < width / 2 ? borderRadius[1][0] : width / 2,
623+
trv = borderRadius[1][1] < height / 2 ? borderRadius[1][1] : height / 2,
624+
brh = borderRadius[2][0] < width / 2 ? borderRadius[2][0] : width / 2,
625+
brv = borderRadius[2][1] < height / 2 ? borderRadius[2][1] : height / 2,
626+
blh = borderRadius[3][0] < width / 2 ? borderRadius[3][0] : width / 2,
627+
blv = borderRadius[3][1] < height / 2 ? borderRadius[3][1] : height / 2;
628628

629629
var topWidth = width - trh,
630630
rightHeight = height - brv,

0 commit comments

Comments
 (0)