Skip to content

Commit eb8feee

Browse files
committed
Adjust the size by one pixel
1 parent 903366b commit eb8feee

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/react-devtools-shared/src/devtools/views/SuspenseTab/SuspenseRects.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ function ScaledRect({
3636
rect,
3737
visible,
3838
suspended,
39+
adjust,
3940
...props
4041
}: {
4142
className: string,
4243
rect: Rect,
4344
visible: boolean,
4445
suspended: boolean,
46+
adjust?: boolean,
4547
...
4648
}): React$Node {
4749
const viewBox = useContext(ViewBox);
@@ -57,8 +59,9 @@ function ScaledRect({
5759
data-visible={visible}
5860
data-suspended={suspended}
5961
style={{
60-
width,
61-
height,
62+
// Shrink one pixel so that the bottom outline will line up with the top outline of the next one.
63+
width: adjust ? 'calc(' + width + ' - 1px)' : width,
64+
height: adjust ? 'calc(' + height + ' - 1px)' : height,
6265
top: y,
6366
left: x,
6467
}}
@@ -159,7 +162,7 @@ function SuspenseRects({
159162
key={index}
160163
className={styles.SuspenseRectsRect}
161164
rect={rect}
162-
data-highlighted={selected}
165+
adjust={true}
163166
onClick={handleClick}
164167
onDoubleClick={handleDoubleClick}
165168
onPointerOver={handlePointerOver}

0 commit comments

Comments
 (0)