From ed237994b6385911345ebab5e543ebb19c9f0512 Mon Sep 17 00:00:00 2001
From: Harm Kube <h.kube@tu-braunschweig.de>
Date: Mon, 24 Jan 2022 20:00:27 +0100
Subject: [PATCH] Some refactoring

---
 display/overlays/neighbors.js | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/display/overlays/neighbors.js b/display/overlays/neighbors.js
index c3d573d..0c99aa1 100644
--- a/display/overlays/neighbors.js
+++ b/display/overlays/neighbors.js
@@ -30,18 +30,21 @@ class NodeNeighborOverlay {
             "bottom-container",
             this.parentNode
         );
+        // Create the collapsible of the entire menu
         const coll = Helpers.createDiv(
             "button",
             bottomContainerDiv
         );
         coll.className = "collapsible";
         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(
             "neighbor-content-tabs",
             bottomContainerDiv
         );
-        coll.style.display = "flex";
-        coll.style.textDecoration = "underline black";
         this.contentTab = contentTabs;
         contentTabs.style.display = "flex";
         coll.addEventListener("click", function() {
@@ -57,7 +60,7 @@ class NodeNeighborOverlay {
                 : this.graph.nodeColors;
         for (const [cls, color] of Object.entries(colors)) {
 
-
+            // Creating the collapsible tabs for the different chapters
             const collTab = Helpers.createDiv(
                 "button",
                 contentTabs
@@ -69,7 +72,7 @@ class NodeNeighborOverlay {
             collTab.type = cls;
             this.tabNavHandles[cls] = collTab;
 
-
+            // Content of the different tabs
             const collTabContent = Helpers.createDiv(
                 "neighbor-content-links",
                 contentTabs
-- 
GitLab