Skip to content

Commit

Permalink
fix: fix table frame corner radius display problem #1783
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed May 30, 2024
1 parent 26adafc commit fd9cdfb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vtable",
"comment": "fix: fix table frame corner radius display problem #1783",
"type": "none"
}
],
"packageName": "@visactor/vtable"
}
4 changes: 4 additions & 0 deletions packages/vtable/src/scenegraph/style/frame-border.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export function createFrameBorder(
if (Array.isArray(borderColor)) {
(rectAttributes as any).strokeArrayColor = getQuadProps(borderColor as any);
}

if (Array.isArray(borderLineWidth)) {
(rectAttributes as any).strokeArrayWidth = getQuadProps(borderLineWidth);
(rectAttributes as any).lineWidth = 1;
Expand Down Expand Up @@ -117,6 +118,9 @@ export function createFrameBorder(
rectAttributes.y = borderTop / 2;
rectAttributes.pickable = false;
if (isTableGroup) {
if (cornerRadius) {
rectAttributes.cornerRadius = cornerRadius + (rectAttributes.lineWidth ?? 0) / 2;
}
if (frameTheme.innerBorder) {
rectAttributes.x = group.attribute.x + borderLeft / 2;
rectAttributes.y = group.attribute.y + borderTop / 2;
Expand Down

0 comments on commit fd9cdfb

Please sign in to comment.