Merge branch 'main' into feat/resize-node

This commit is contained in:
moklick
2022-12-01 14:53:19 +01:00
27 changed files with 265 additions and 87 deletions
+2 -1
View File
@@ -96,6 +96,7 @@ function useDrag({
onSelectionDrag,
snapGrid,
snapToGrid,
nodeOrigin,
} = store.getState();
const pointerPos = getPointerPosition(event);
// skip events without movement
@@ -115,7 +116,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;