From 30e9dae9fd28256d5525dc998ff5fb4deaf25422 Mon Sep 17 00:00:00 2001 From: Harm Kube <h.kube@tu-braunschweig.de> Date: Sat, 19 Feb 2022 18:35:36 +0100 Subject: [PATCH] Fixed interaction with filter overlay --- display/overlays/filteroverlay.js | 1 + display/overlays/neighbors.js | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/display/overlays/filteroverlay.js b/display/overlays/filteroverlay.js index 36c1cbb..06d6804 100644 --- a/display/overlays/filteroverlay.js +++ b/display/overlays/filteroverlay.js @@ -74,5 +74,6 @@ class FilterOverlay { } else { target.style.opacity = 1.0; } + this.graph.infoOverlay.bottomMenu.toggleCategory(target.type); } } diff --git a/display/overlays/neighbors.js b/display/overlays/neighbors.js index 0bb0a87..e2e326a 100644 --- a/display/overlays/neighbors.js +++ b/display/overlays/neighbors.js @@ -106,6 +106,7 @@ class NodeNeighborOverlay { collTabContent.list = list; this.tabContentPages[cls] = collTabContent; + collTabContent.marker = openMarkerTabs; collTab.addEventListener("click", function() { if(collTabContent.style.display === "flex") { jQuery(collTabContent).slideUp("fast"); @@ -186,6 +187,24 @@ class NodeNeighborOverlay { } } } + + toggleCategory (type) { + for (const page of Object.values(this.tabContentPages)) { + if(page.type == type) { + if(this.tabNavHandles[page.type].style.display == "flex") { + this.tabNavHandles[page.type].style.display = "none"; + const collTabContent = this.tabContentPages[page.type]; + jQuery(collTabContent).slideUp("fast"); + collTabContent.marker.innerText = '+'; + } else { + if(page.list.hasChildNodes()) { + this.tabNavHandles[page.type].style.display = "flex"; + this.tabNavHandles[page.type].marker.innerText = '+'; + } + } + } + } + } } -- GitLab