Skip to content

Commit a436d5d

Browse files
starlight-93张敏
andauthored
fix: highlight border to be drawn multiple times (#1005)
Co-authored-by: 张敏 <zhangmin.qa@bytedance.com>
1 parent ee5c60e commit a436d5d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/core/src/internal/data-grid/render/data-grid.render.rings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export function drawHighlightRings(
117117
) {
118118
const wasDashed: boolean = dashed;
119119
const needsClip = !rectContains(s.clip, s.rect);
120+
ctx.beginPath();
120121
if (needsClip) {
121122
ctx.save();
122123
ctx.rect(s.clip.x, s.clip.y, s.clip.width, s.clip.height);
@@ -133,6 +134,7 @@ export function drawHighlightRings(
133134
s.style === "solid-outline"
134135
? blend(blend(s.color, theme.borderColor), theme.bgCell)
135136
: withAlpha(s.color, 1);
137+
ctx.closePath();
136138
ctx.strokeRect(s.rect.x + 0.5, s.rect.y + 0.5, s.rect.width - 1, s.rect.height - 1);
137139
if (needsClip) {
138140
ctx.restore();

0 commit comments

Comments
 (0)