Skip to content
Snippets Groups Projects
Commit a8ff5543 authored by Matthias Konitzny's avatar Matthias Konitzny :fire:
Browse files

Code readability improvements

parent d2e2da58
No related branches found
No related tags found
No related merge requests found
......@@ -105,14 +105,14 @@ class NodeNeighborOverlay {
toggleTabVisibility(cls) {
this.tabNavHandles[cls].classList.toggle("bottom-container-nav-tab");
this.tabNavHandles[cls].classList.toggle("hidden-tab");
this.tabContentPages[cls].classList.toggle(
"bottom-container-tab-content"
);
this.tabContentPages[cls].classList.toggle("hidden-tab");
const tcc = this.tabContentPages[cls].classList;
tcc.toggle("bottom-container-tab-content");
tcc.toggle("hidden-tab");
// If the tab gets hidden and is the active tab, search for an alternative nav tab to become the new active tab.
if (this.tabContentPages[cls].classList.contains("hidden-tab")) {
if (this.tabNavHandles[cls].classList.contains("active-tab-nav")) {
if (tcc.contains("hidden-tab")) {
if (tcc.contains("active-tab-nav")) {
for (const tab of Object.values(this.tabNavHandles)) {
if (!tab.classList.contains("hidden-tab")) {
this.openTab(tab.type);
......
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