fix(selection): use correct x y for selection rect on direction change closes #1772
This commit is contained in:
@@ -185,8 +185,8 @@ export default function reactFlowReducer(state = initialState, action: ReactFlow
|
|||||||
|
|
||||||
const nextUserSelectRect = {
|
const nextUserSelectRect = {
|
||||||
...state.userSelectionRect,
|
...state.userSelectionRect,
|
||||||
x: mousePos.x < startX ? mousePos.x : state.userSelectionRect.x,
|
x: mousePos.x < startX ? mousePos.x : startX,
|
||||||
y: mousePos.y < startY ? mousePos.y : state.userSelectionRect.y,
|
y: mousePos.y < startY ? mousePos.y : startY,
|
||||||
width: Math.abs(mousePos.x - startX),
|
width: Math.abs(mousePos.x - startX),
|
||||||
height: Math.abs(mousePos.y - startY),
|
height: Math.abs(mousePos.y - startY),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user