fix(subflow-node-origin): use node origin in node position calculation
This commit is contained in:
@@ -114,6 +114,7 @@ function useDrag({
|
||||
onSelectionDrag,
|
||||
snapGrid,
|
||||
snapToGrid,
|
||||
nodeOrigin,
|
||||
} = store.getState();
|
||||
const pointerPos = getPointerPosition(event);
|
||||
// skip events without movement
|
||||
@@ -133,7 +134,7 @@ function useDrag({
|
||||
nextPosition.y = snapGrid[1] * Math.round(nextPosition.y / snapGrid[1]);
|
||||
}
|
||||
|
||||
const updatedPos = calcNextPosition(n, nextPosition, nodeInternals, nodeExtent);
|
||||
const updatedPos = calcNextPosition(n, nextPosition, nodeInternals, nodeExtent, nodeOrigin);
|
||||
|
||||
n.position = updatedPos.position;
|
||||
n.positionAbsolute = updatedPos.positionAbsolute;
|
||||
|
||||
Reference in New Issue
Block a user