From 9344365aff3469f8cf6af21193a3a49b549ef063 Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Wed, 30 Mar 2022 23:40:53 +0200 Subject: [PATCH] update: set zindex to 0 on initial parse --- package/src/utils/graph.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/src/utils/graph.ts b/package/src/utils/graph.ts index 62355cf1..b3e7430b 100644 --- a/package/src/utils/graph.ts +++ b/package/src/utils/graph.ts @@ -74,7 +74,7 @@ export const parseNode = (node: Node, nodeExtent: CoordinateExtent, defaults?: P target: [], }, computedPosition: { - z: typeof node.style?.zIndex === 'string' ? parseInt(node.style?.zIndex as string) : node.style?.zIndex ?? 0, + z: 0, ...clampPosition(node.position, nodeExtent), }, dragging: false, @@ -100,7 +100,7 @@ export const parseEdge = (edge: Edge, defaults?: Partial): GraphEdge type: edge.type ?? 'default', source: edge.source.toString(), target: edge.target.toString(), - z: typeof edge.style?.zIndex === 'string' ? parseInt(edge.style?.zIndex as string) : edge.style?.zIndex ?? 0, + z: 0, sourceX: 0, sourceY: 0, targetX: 0,