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

Some refactoring

parent 6fa8fb21
No related branches found
No related tags found
No related merge requests found
Pipeline #53695 passed
...@@ -30,18 +30,21 @@ class NodeNeighborOverlay { ...@@ -30,18 +30,21 @@ class NodeNeighborOverlay {
"bottom-container", "bottom-container",
this.parentNode this.parentNode
); );
// Create the collapsible of the entire menu
const coll = Helpers.createDiv( const coll = Helpers.createDiv(
"button", "button",
bottomContainerDiv bottomContainerDiv
); );
coll.className = "collapsible"; coll.className = "collapsible";
coll.innerText = "Verwandte Inhalte"; coll.innerText = "Verwandte Inhalte";
coll.style.display = "flex";
coll.style.textDecoration = "underline black";
// Div that displays the information about all the chapters
var contentTabs = Helpers.createDiv( var contentTabs = Helpers.createDiv(
"neighbor-content-tabs", "neighbor-content-tabs",
bottomContainerDiv bottomContainerDiv
); );
coll.style.display = "flex";
coll.style.textDecoration = "underline black";
this.contentTab = contentTabs; this.contentTab = contentTabs;
contentTabs.style.display = "flex"; contentTabs.style.display = "flex";
coll.addEventListener("click", function() { coll.addEventListener("click", function() {
...@@ -57,7 +60,7 @@ class NodeNeighborOverlay { ...@@ -57,7 +60,7 @@ class NodeNeighborOverlay {
: this.graph.nodeColors; : this.graph.nodeColors;
for (const [cls, color] of Object.entries(colors)) { for (const [cls, color] of Object.entries(colors)) {
// Creating the collapsible tabs for the different chapters
const collTab = Helpers.createDiv( const collTab = Helpers.createDiv(
"button", "button",
contentTabs contentTabs
...@@ -69,7 +72,7 @@ class NodeNeighborOverlay { ...@@ -69,7 +72,7 @@ class NodeNeighborOverlay {
collTab.type = cls; collTab.type = cls;
this.tabNavHandles[cls] = collTab; this.tabNavHandles[cls] = collTab;
// Content of the different tabs
const collTabContent = Helpers.createDiv( const collTabContent = Helpers.createDiv(
"neighbor-content-links", "neighbor-content-links",
contentTabs contentTabs
......
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