Commit dc19ba65 authored by Nicolas Pernoud's avatar Nicolas Pernoud
Browse files

fix: animation sequence

parent e51192cb
Pipeline #6120 passed with stages
in 2 minutes and 49 seconds
......@@ -75,7 +75,7 @@
</div>
<div class="navbar-menu">
<div class="navbar-end">
<div class="navbar-item"><p>v4.3.26</p></div>
<div class="navbar-item"><p>v4.3.27</p></div>
</div>
</div>
</nav>
......
......@@ -54,13 +54,13 @@ async function navigate() {
async function load(element, domAlteration) {
await AnimateCSS(element, "fadeOut");
element.classList.add("is-hidden");
// Start the alteration
const alteration = domAlteration();
spinner.classList.remove("is-hidden");
await AnimateCSS(spinner, "fadeIn");
if (typeof domAlteration === "function") {
await domAlteration();
await AnimateCSS(spinner, "fadeOut");
spinner.classList.add("is-hidden");
element.classList.remove("is-hidden");
AnimateCSS(element, "fadeIn");
}
await alteration; // Await for alteration end
await AnimateCSS(spinner, "fadeOut");
spinner.classList.add("is-hidden");
element.classList.remove("is-hidden");
AnimateCSS(element, "fadeIn");
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment