Skip to content

Commit

Permalink
fix top right border radius (#2522)
Browse files Browse the repository at this point in the history
  • Loading branch information
flyskyko authored May 7, 2021
1 parent 7222aba commit ba17267
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/render/bound-curves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class BoundCurves {
? getCurvePoints(
bounds.left + Math.min(topWidth, bounds.width + borderLeftWidth),
bounds.top + borderTopWidth,
topWidth > bounds.width + borderLeftWidth ? 0 : trh - borderLeftWidth,
topWidth > bounds.width + borderRightWidth ? 0 : trh - borderRightWidth,
trv - borderTopWidth,
CORNER.TOP_RIGHT
)
Expand Down
8 changes: 8 additions & 0 deletions tests/reftests/border/radius.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@
border-radius: 200px;
}

.box7 {
border-width: 10px 10px 10px 1px;
border-left-color: transparent;
border-top-color: red;
border-right-color: green;
}

.gauge{
display: inline-block;
width: 100px;
Expand Down Expand Up @@ -91,6 +98,7 @@
<div class="box box4">&nbsp;</div>
<div class="box box5">&nbsp;</div>
<div class="box box6">&nbsp;</div>
<div class="box box7">&nbsp;</div>
<div class="gauge gauge1"></div>
<div class="gauge gauge2"></div>
<div class="gauge gauge3"></div>
Expand Down

0 comments on commit ba17267

Please sign in to comment.