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

Sliding animation now working

parent 47d38683
No related branches found
No related tags found
No related merge requests found
Pipeline #54797 passed
...@@ -341,8 +341,6 @@ ...@@ -341,8 +341,6 @@
display: none; display: none;
background-color: #ffffff; background-color: #ffffff;
flex-direction: column; flex-direction: column;
height: 0;
transition: height 0.25s ease-out;
overflow: hidden; overflow: hidden;
} }
......
...@@ -49,15 +49,18 @@ class NodeNeighborOverlay { ...@@ -49,15 +49,18 @@ class NodeNeighborOverlay {
contentTabs.style.display = "flex"; contentTabs.style.display = "flex";
coll.addEventListener("click", function() { coll.addEventListener("click", function() {
if(contentTabs.style.display === "flex") { if(contentTabs.style.display === "flex") {
contentTabs.style.display = "none"; jQuery(contentTabs).slideUp("fast");
} else { } else {
contentTabs.style.display = "flex"; jQuery(contentTabs).slideDown({
start: function () {
jQuery(this).css({
display: "flex"
})
}
});
} }
}); });
const slideDown = elem => elem.style.height = `${elem.scrollHeight}px`;
const slideUp = elem => elem.style.height = '0';
const colors = const colors =
this.type === "link" this.type === "link"
? this.graph.edgeColors ? this.graph.edgeColors
...@@ -105,13 +108,17 @@ class NodeNeighborOverlay { ...@@ -105,13 +108,17 @@ class NodeNeighborOverlay {
this.tabContentPages[cls] = collTabContent; this.tabContentPages[cls] = collTabContent;
collTab.addEventListener("click", function() { collTab.addEventListener("click", function() {
if(collTabContent.style.display === "flex") { if(collTabContent.style.display === "flex") {
slideUp(collTabContent); jQuery(collTabContent).slideUp("fast");
collTabContent.style.display = "none";
openMarkerTabs.innerText = '+'; openMarkerTabs.innerText = '+';
} else { } else {
collTabContent.style.display = "flex"; jQuery(collTabContent).slideDown({
start: function () {
jQuery(this).css({
display: "flex"
})
}
});
openMarkerTabs.innerText = '-'; 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