Skip to content

Commit

Permalink
Cleanup dashed handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jassmith committed Jan 7, 2024
1 parent f8c43d1 commit c2dbff4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/core/src/internal/data-grid/data-grid-render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1741,6 +1741,7 @@ function drawHighlightRings(
s?.rect !== undefined &&
intersectRect(0, 0, width, height, s.rect.x, s.rect.y, s.rect.width, s.rect.height)
) {
const wasDashed: boolean = dashed;
const needsClip = !rectContains(s.clip, s.rect);
if (needsClip) {
ctx.save();
Expand All @@ -1759,7 +1760,10 @@ function drawHighlightRings(
? blend(blend(s.color, theme.borderColor), theme.bgCell)
: withAlpha(s.color, 1);
ctx.strokeRect(s.rect.x + 0.5, s.rect.y + 0.5, s.rect.width - 1, s.rect.height - 1);
if (needsClip) ctx.restore();
if (needsClip) {
ctx.restore();
dashed = wasDashed;
}
}
}
}
Expand Down

0 comments on commit c2dbff4

Please sign in to comment.