fix(selection): use correct x y for selection rect on direction change closes #1772

This commit is contained in:
moklick
2021-12-18 14:39:01 +01:00
parent 92adb9dfb4
commit eecfddc55b

View File

@@ -185,8 +185,8 @@ export default function reactFlowReducer(state = initialState, action: ReactFlow
const nextUserSelectRect = {
...state.userSelectionRect,
x: mousePos.x < startX ? mousePos.x : state.userSelectionRect.x,
y: mousePos.y < startY ? mousePos.y : state.userSelectionRect.y,
x: mousePos.x < startX ? mousePos.x : startX,
y: mousePos.y < startY ? mousePos.y : startY,
width: Math.abs(mousePos.x - startX),
height: Math.abs(mousePos.y - startY),
};