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

Animation when opening sub-sections

parent 80ffb89d
No related branches found
No related tags found
No related merge requests found
......@@ -310,10 +310,11 @@
.neighbor-content-links {
padding: 5px;
display: none;
overflow: hidden;
background-color: #ffffff;
flex-direction: column;
overflow-x: auto;
height: 0;
transition: height 0.25s ease-out;
overflow: hidden;
}
.link-neighbor {
......
......@@ -64,7 +64,8 @@ class NodeNeighborOverlay {
}
});
const slideDown = elem => elem.style.height = `${elem.scrollHeight}px`;
const slideUp = elem => elem.style.height = '0';
const colors =
this.type === "link"
......@@ -105,11 +106,13 @@ class NodeNeighborOverlay {
this.tabContentPages[cls] = collTabContent;
collTab.addEventListener("click", function() {
if(collTabContent.style.display === "flex") {
slideUp(collTabContent);
collTabContent.style.display = "none";
openMarkerTabs.innerText = '+';
} else {
collTabContent.style.display = "flex";
openMarkerTabs.innerText = '-';
slideDown(collTabContent);
}
});
}
......
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