feat(edges): Add source-target-pos to graph-edge

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent 600e3866c4
commit 1b206c942c
9 changed files with 143 additions and 117 deletions
+4
View File
@@ -97,6 +97,10 @@ export const parseEdge = (edge: Edge, defaults?: Partial<GraphEdge>): GraphEdge
source: edge.source.toString(),
target: edge.target.toString(),
z: typeof edge.style?.zIndex === 'string' ? parseInt(edge.style?.zIndex) : edge.style?.zIndex ?? 0,
sourceX: 0,
sourceY: 0,
targetX: 0,
targetY: 0,
...defaults,
}
: defaults