Skip to content

Commit e86cd8d

Browse files
committed
fix: fixing the child length
1 parent e2d498f commit e86cd8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/observability/src/shared/components/topology/d3/layouts/custom-tree-layout.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export class CustomTreeLayout extends TreeLayout {
99
const nodeWidth = this.getNodeWidth(rootHierarchyNode);
1010
const nodeHeight = this.getNodeHeight(rootHierarchyNode);
1111

12-
this.updateLayout(rootHierarchyNode, 0, -1, nodeWidth * 1, nodeHeight);
12+
this.updateLayout(rootHierarchyNode, 0, -1, nodeWidth * 1.2, nodeHeight * 1.2);
1313
}
1414

1515
private updateLayout(
@@ -28,6 +28,6 @@ export class CustomTreeLayout extends TreeLayout {
2828
this.updateLayout(node, nodeRowIndex + index, nodeColumnIndex + 1, cellWidth, cellHeight);
2929
});
3030

31-
return (hierarchyNode.children?.length ?? 0) + 1;
31+
return (hierarchyNode.children?.length ?? 1);
3232
}
3333
}

0 commit comments

Comments
 (0)