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

Adding links to the menu

parent ad58a3b6
No related branches found
No related tags found
No related merge requests found
...@@ -293,10 +293,18 @@ ...@@ -293,10 +293,18 @@
background-color: #ccc; background-color: #ccc;
} }
.content { .content-tabs {
padding: 0 18px; padding: 0 18px;
display: none; display: none;
overflow: hidden; overflow: hidden;
background-color: #f1f1f1; background-color: #f1f1f1;
flex-direction: column; flex-direction: column;
}
.content-links {
padding: 0 18px;
display: none;
overflow: hidden;
background-color: #f1f1f1;
flex-direction: row;
} }
\ No newline at end of file
...@@ -38,9 +38,10 @@ class NodeNeighborOverlay { ...@@ -38,9 +38,10 @@ class NodeNeighborOverlay {
coll.className = "collapsible"; coll.className = "collapsible";
coll.innerText = "Nachbarn"; coll.innerText = "Nachbarn";
var contentTabs = Helpers.createDiv( var contentTabs = Helpers.createDiv(
"content", "content-tabs",
bottomContainerDiv bottomContainerDiv
); );
this.contentTab = contentTabs;
coll.addEventListener("click", function() { coll.addEventListener("click", function() {
if(contentTabs.style.display === "flex") { if(contentTabs.style.display === "flex") {
contentTabs.style.display = "none"; contentTabs.style.display = "none";
...@@ -61,11 +62,12 @@ class NodeNeighborOverlay { ...@@ -61,11 +62,12 @@ class NodeNeighborOverlay {
collTab.innerText = cls; collTab.innerText = cls;
collTab.style.backgroundColor = color; collTab.style.backgroundColor = color;
collTab.type = cls; collTab.type = cls;
this.tabNavHandles[cls] = collTab;
const collTabContent = Helpers.createDiv( const collTabContent = Helpers.createDiv(
"content", "content-links",
contentTabs contentTabs
); );
collTabContent.innerText = "Example Text"; this.tabContentPages[cls] = collTabContent;
collTab.addEventListener("click", function() { collTab.addEventListener("click", function() {
if(collTabContent.style.display === "flex") { if(collTabContent.style.display === "flex") {
collTabContent.style.display = "none"; collTabContent.style.display = "none";
...@@ -81,9 +83,12 @@ class NodeNeighborOverlay { ...@@ -81,9 +83,12 @@ class NodeNeighborOverlay {
*/ */
clearTabContentPages() { clearTabContentPages() {
//TODO: Clear all content of content containers //TODO: Clear all content of content containers
/*for (const page of Object.values(this.tabContentPages)) { for (const page of Object.values(this.tabContentPages)) {
jQuery(page).empty(); jQuery(page).empty();
}*/ if(page.style.display === "flex") {
page.style.display = "none";
}
}
} }
/** /**
...@@ -121,8 +126,10 @@ class NodeNeighborOverlay { ...@@ -121,8 +126,10 @@ class NodeNeighborOverlay {
* @param node * @param node
*/ */
updateTabs(node) { updateTabs(node) {
//TODO: Write update function to update content container this.clearTabContentPages();
/*this.clearTabContentPages(); if(this.contentTab.style.display === "flex") {
this.contentTab.style.display = "none";
}
for (const link of node.links) { for (const link of node.links) {
const target = link.source == node ? link.target : link.source; const target = link.source == node ? link.target : link.source;
...@@ -132,6 +139,8 @@ class NodeNeighborOverlay { ...@@ -132,6 +139,8 @@ class NodeNeighborOverlay {
} else { } else {
this.tabContentPages[target.type].appendChild(reference); this.tabContentPages[target.type].appendChild(reference);
} }
}*/ }
} }
} }
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