This commit is contained in:
Gerard Burns 2024-04-03 07:50:43 +01:00
parent 1296f8c6b2
commit ad1b30431d
1 changed files with 7 additions and 2 deletions

View File

@ -48,9 +48,10 @@
const fadeOut = [{ opacity: "1" }, { opacity: "0" }]; const fadeOut = [{ opacity: "1" }, { opacity: "0" }];
const fadeTiming = { const fadeTiming = {
duration: 300, duration: 200,
iterations: 1, iterations: 1,
easing: "ease-in" easing: "ease-in",
fill: "forwards"
}; };
currentTooltip.animate(fadeIn, fadeTiming); currentTooltip.animate(fadeIn, fadeTiming);
@ -60,6 +61,8 @@
if (initialShow) { if (initialShow) {
initialShow = false; initialShow = false;
previousTooltip.style.visibility = "hidden"
wrapper.style.transition = "none"; wrapper.style.transition = "none";
wrapper.style.width = `${currentTooltipWidth}px` wrapper.style.width = `${currentTooltipWidth}px`
wrapper.style.height = `${currentTooltipHeight}px` wrapper.style.height = `${currentTooltipHeight}px`
@ -74,6 +77,8 @@
wrapper.style.removeProperty("transition"); wrapper.style.removeProperty("transition");
resetWrapper.style.removeProperty("transition"); resetWrapper.style.removeProperty("transition");
}) })
} else {
previousTooltip.style.removeProperty("visibility");
} }
}) })
} }