Skip to content

Commit f2452c6

Browse files
fix: fixing the child length (#1038)
* fix: fixing the child length * refactor: fixing formatting Co-authored-by: Jake <45181984+jake-bassett@users.noreply.github.com>
1 parent 7c2ba4b commit f2452c6

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)