From f59b7e5db54f0afb7f47be9b334e4cf276ba38cc Mon Sep 17 00:00:00 2001 From: Googler Date: Mon, 21 Jul 2025 21:52:19 -0700 Subject: [PATCH] Skip updates when the graph is hidden in DAG Raw. Currently when graph is grouped and then calculation is happening for each grouped node and its content. With my change if group is not visible then we will not calculate its layout. PiperOrigin-RevId: 785700711 --- src/app/directed_acyclic_graph_raw.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/directed_acyclic_graph_raw.ts b/src/app/directed_acyclic_graph_raw.ts index 07e79e7..b10ab33 100644 --- a/src/app/directed_acyclic_graph_raw.ts +++ b/src/app/directed_acyclic_graph_raw.ts @@ -667,6 +667,10 @@ export class DagRaw implements DoCheck, OnInit, OnDestroy { } updateGraphLayoutSync() { + if (!this.visible) { + return; + } + if (!this.nodes.length && !this.groups.length) { this.a11ySortedNodes = []; this.cdr.detectChanges();