Skip to content

Commit 6bbd06a

Browse files
committed
fix(selection): use start x and y when direction changes
1 parent 0e3ddc2 commit 6bbd06a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/UserSelection/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ export default memo(({ selectionKeyPressed }: UserSelectionProps) => {
9191

9292
const nextUserSelectRect = {
9393
...userSelectionRect,
94-
x: mousePos.x < startX ? mousePos.x : userSelectionRect.x,
95-
y: mousePos.y < startY ? mousePos.y : userSelectionRect.y,
94+
x: mousePos.x < startX ? mousePos.x : startX,
95+
y: mousePos.y < startY ? mousePos.y : startY,
9696
width: Math.abs(mousePos.x - startX),
9797
height: Math.abs(mousePos.y - startY),
9898
};

0 commit comments

Comments
 (0)