From e86cd8dfba8be4f2cfd5915181254eb27660b56d Mon Sep 17 00:00:00 2001 From: anandtiwary <52081890+anandtiwary@users.noreply.github.com> Date: Thu, 29 Jul 2021 16:28:09 -0700 Subject: [PATCH 1/2] fix: fixing the child length --- .../components/topology/d3/layouts/custom-tree-layout.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/observability/src/shared/components/topology/d3/layouts/custom-tree-layout.ts b/projects/observability/src/shared/components/topology/d3/layouts/custom-tree-layout.ts index a099d231b..1e3b04712 100644 --- a/projects/observability/src/shared/components/topology/d3/layouts/custom-tree-layout.ts +++ b/projects/observability/src/shared/components/topology/d3/layouts/custom-tree-layout.ts @@ -9,7 +9,7 @@ export class CustomTreeLayout extends TreeLayout { const nodeWidth = this.getNodeWidth(rootHierarchyNode); const nodeHeight = this.getNodeHeight(rootHierarchyNode); - this.updateLayout(rootHierarchyNode, 0, -1, nodeWidth * 1, nodeHeight); + this.updateLayout(rootHierarchyNode, 0, -1, nodeWidth * 1.2, nodeHeight * 1.2); } private updateLayout( @@ -28,6 +28,6 @@ export class CustomTreeLayout extends TreeLayout { this.updateLayout(node, nodeRowIndex + index, nodeColumnIndex + 1, cellWidth, cellHeight); }); - return (hierarchyNode.children?.length ?? 0) + 1; + return (hierarchyNode.children?.length ?? 1); } } From 6532b5d4e0d0da32f75f94be1aff2a7ea9983a4e Mon Sep 17 00:00:00 2001 From: anandtiwary <52081890+anandtiwary@users.noreply.github.com> Date: Thu, 29 Jul 2021 16:47:56 -0700 Subject: [PATCH 2/2] refactor: fixing formatting --- .../shared/components/topology/d3/layouts/custom-tree-layout.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/observability/src/shared/components/topology/d3/layouts/custom-tree-layout.ts b/projects/observability/src/shared/components/topology/d3/layouts/custom-tree-layout.ts index 1e3b04712..64d0880cf 100644 --- a/projects/observability/src/shared/components/topology/d3/layouts/custom-tree-layout.ts +++ b/projects/observability/src/shared/components/topology/d3/layouts/custom-tree-layout.ts @@ -28,6 +28,6 @@ export class CustomTreeLayout extends TreeLayout { this.updateLayout(node, nodeRowIndex + index, nodeColumnIndex + 1, cellWidth, cellHeight); }); - return (hierarchyNode.children?.length ?? 1); + return hierarchyNode.children?.length ?? 1; } }