Skip to content

Commit 6570514

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

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 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
}}
@@ -160,6 +163,7 @@ function SuspenseRects({
160163
className={styles.SuspenseRectsRect}
161164
rect={rect}
162165
data-highlighted={selected}
166+
adjust={true}
163167
onClick={handleClick}
164168
onDoubleClick={handleDoubleClick}
165169
onPointerOver={handlePointerOver}

0 commit comments

Comments
 (0)