Skip to content
Snippets Groups Projects
Commit 8ad9d9fa authored by Harm Kube's avatar Harm Kube
Browse files

Hiding categories that have no links

parent c4b3d738
No related branches found
No related tags found
No related merge requests found
...@@ -305,13 +305,13 @@ ...@@ -305,13 +305,13 @@
padding: 0 18px; padding: 0 18px;
display: none; display: none;
overflow: hidden; overflow: hidden;
background-color: #000000; background-color: #494949;
flex-direction: row; flex-direction: row;
} }
.category-div { .category-div {
padding: 0; padding: 0;
background-color: #000000; background-color: #5d5a5a;
color: #444; color: #444;
cursor: pointer; cursor: pointer;
width: 5%; width: 5%;
......
...@@ -73,6 +73,7 @@ class NodeNeighborOverlay { ...@@ -73,6 +73,7 @@ class NodeNeighborOverlay {
"neighbor-content-links", "neighbor-content-links",
contentTabs contentTabs
); );
collTabContent.type = cls;
this.tabContentPages[cls] = collTabContent; this.tabContentPages[cls] = collTabContent;
collTab.addEventListener("click", function() { collTab.addEventListener("click", function() {
if(collTabContent.style.display === "flex") { if(collTabContent.style.display === "flex") {
...@@ -146,6 +147,17 @@ class NodeNeighborOverlay { ...@@ -146,6 +147,17 @@ class NodeNeighborOverlay {
this.tabContentPages[target.type].appendChild(reference); this.tabContentPages[target.type].appendChild(reference);
} }
} }
this.hideContentPages();
}
hideContentPages () {
for (const page of Object.values(this.tabContentPages)) {
if(!page.hasChildNodes()) {
this.tabNavHandles[page.type].style.display = "none";
} else {
this.tabNavHandles[page.type].style.display = "flex";
}
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment