First, thank you for this awesome library. I am playing with the core version of it but I don't understand a particular behavior, I have these flipped elements, and want to animate the opacity to 0 when one element leaves the DOM.
The "problem" is that when the element is being re-inserted in the DOM, it has the opacity set to 0. Do the library cache the element before removing it?
let el = document.querySelectorAll("figure").forEach((f, i) => {
flipper.addFlipped({
element: f,
flipId: "square" + i,
onStart: () => console.log("animation started!"),
onComplete: () => console.log("animation completed!")
onExit: (el, i, remove) => {
snabbt(el, {
opacity: 0,
ease: "tween",
fromOpacity: 1,
complete: () => {
console.log("animation completed2", el);
remove();
}
});
}
});
});