fix(edges): connection line not showing up when no edges are defined
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -150,7 +150,7 @@ export const groupEdgesByZLevel = (edges: GraphEdge[], nodes: GraphNode[]) => {
|
||||
return tree
|
||||
}, {})
|
||||
|
||||
return Object.entries(levelLookup).map(([key, edges]) => {
|
||||
return Object.entries(Object.keys(levelLookup).length ? levelLookup : { 0: [] }).map(([key, edges]) => {
|
||||
const level = +key
|
||||
|
||||
return {
|
||||
|
||||
+2
-2
@@ -335,8 +335,8 @@ export const getTransformForBounds = (
|
||||
export const getXYZPos = (node: GraphNode, result: XYZPosition): XYZPosition => {
|
||||
if (!node.parentNode) return result
|
||||
return getXYZPos(node.parentNode, {
|
||||
x: result.x + node.parentNode.position.x,
|
||||
y: result.y + node.parentNode.position.y,
|
||||
x: result.x + node.parentNode.computedPosition.x,
|
||||
y: result.y + node.parentNode.computedPosition.y,
|
||||
z:
|
||||
node.parentNode.computedPosition.z > node.computedPosition.z ? node.parentNode.computedPosition.z : node.computedPosition.z,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user