feat: Make edges work

This commit is contained in:
Braks
2021-07-09 13:39:17 +02:00
parent 52e1188d04
commit b2c250ef38
10 changed files with 183 additions and 99 deletions
+1 -1
View File
@@ -59,7 +59,6 @@ export function getHandlePosition(position: Position, node: Node, handle: any |
}
export function getHandle(bounds: HandleElement[], handleId: ElementId | null): HandleElement | null {
console.log('handle', bounds);
if (!bounds) {
return null;
}
@@ -94,6 +93,7 @@ export const getEdgePositions = (
const sourceHandlePos = getHandlePosition(sourcePosition, sourceNode, sourceHandle);
const targetHandlePos = getHandlePosition(targetPosition, targetNode, targetHandle);
console.log('getting edge positions');
return {
sourceX: sourceHandlePos.x,
sourceY: sourceHandlePos.y,