+
diff --git a/angular-client/src/pages/graph-page/graph-sidebar/graph-sidebar-desktop/graph-sidebar-desktop.component.ts b/angular-client/src/pages/graph-page/graph-sidebar/graph-sidebar-desktop/graph-sidebar-desktop.component.ts
index 0ba7c9da..febd51ae 100644
--- a/angular-client/src/pages/graph-page/graph-sidebar/graph-sidebar-desktop/graph-sidebar-desktop.component.ts
+++ b/angular-client/src/pages/graph-page/graph-sidebar/graph-sidebar-desktop/graph-sidebar-desktop.component.ts
@@ -4,7 +4,7 @@ import { DataType, Node, NodeWithVisibilityToggle, NodeWithVisibilityToggleObser
import Storage from 'src/services/storage.service';
import { decimalPipe } from 'src/utils/pipes.utils';
import { FormControl, FormGroup } from '@angular/forms';
-import { debounceTime, Observable, of, Subscription } from 'rxjs';
+import { debounceTime, Observable, of, Subject, Subscription } from 'rxjs';
/**
* Sidebar component that displays the nodes and their data types.
@@ -49,6 +49,7 @@ import { debounceTime, Observable, of, Subscription } from 'rxjs';
export default class GraphSidebarDesktop implements OnInit {
@Input() nodes!: Node[];
@Input() selectDataType!: (dataType: DataType) => void;
+ @Input() selectedDataType: Subject
= new Subject();
nodesWithVisibilityToggle!: Observable;
filterForm: FormGroup = new FormGroup({
@@ -58,6 +59,7 @@ export default class GraphSidebarDesktop implements OnInit {
searchFilter: string = '';
dataValuesMap: Map = new Map();
+ dataTypeName?: string;
constructor(private storage: Storage) {}
/**
@@ -91,6 +93,14 @@ export default class GraphSidebarDesktop implements OnInit {
});
}
}
+
+ this.selectedDataType.subscribe((dataType: DataType) => {
+ this.dataTypeName = dataType.name;
+ });
+ }
+
+ isNodeOpen(node: NodeWithVisibilityToggle) {
+ return node.dataTypes.filter((dataType: DataType) => dataType.name === this.dataTypeName).length > 0;
}
ngOnDestroy(): void {
diff --git a/angular-client/src/pages/graph-page/graph-sidebar/graph-sidebar.component.html b/angular-client/src/pages/graph-page/graph-sidebar/graph-sidebar.component.html
index a569fedf..ca561f3a 100644
--- a/angular-client/src/pages/graph-page/graph-sidebar/graph-sidebar.component.html
+++ b/angular-client/src/pages/graph-page/graph-sidebar/graph-sidebar.component.html
@@ -2,5 +2,5 @@