feat(connection-radius): use closest handle / snappy edges #2759

This commit is contained in:
moklick
2023-01-18 17:51:43 +01:00
parent e96309b6a5
commit 5af609696b
7 changed files with 152 additions and 49 deletions
+7
View File
@@ -141,6 +141,13 @@ export const pointToRendererPoint = (
return position;
};
export const rendererPointToPoint = ({ x, y }: XYPosition, [tx, ty, tScale]: Transform): XYPosition => {
return {
x: x * tScale + tx,
y: y * tScale + ty,
};
};
export const getNodePositionWithOrigin = (
node: Node | undefined,
nodeOrigin: NodeOrigin = [0, 0]