|
|
@ -382,14 +382,12 @@ function animate(element, options, counterpart, t2, on_finish) {
|
|
|
|
// multiplier is in effect). in the common case that it is `0`, we keep it anyway so that
|
|
|
|
// multiplier is in effect). in the common case that it is `0`, we keep it anyway so that
|
|
|
|
// the CSS keyframes aren't created until the DOM is updated
|
|
|
|
// the CSS keyframes aren't created until the DOM is updated
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// fill forwards to prevent the element to render without animation styles applied
|
|
|
|
// fill forwards to prevent the element from rendering without styles applied
|
|
|
|
// when entering the onfinish callback, can be verified by adding a breakpoint in the onfinish callback
|
|
|
|
|
|
|
|
// see https://github.com/sveltejs/svelte/issues/14732
|
|
|
|
// see https://github.com/sveltejs/svelte/issues/14732
|
|
|
|
var animation = element.animate(keyframes, { duration: delay, fill: 'forwards' });
|
|
|
|
var animation = element.animate(keyframes, { duration: delay, fill: 'forwards' });
|
|
|
|
|
|
|
|
|
|
|
|
animation.onfinish = () => {
|
|
|
|
animation.onfinish = () => {
|
|
|
|
// have to manually cancel the dummy animation to remove it from the animations stack
|
|
|
|
// remove dummy animation from the stack to prevent conflict with main animation
|
|
|
|
// because it fill forwards
|
|
|
|
|
|
|
|
animation.cancel();
|
|
|
|
animation.cancel();
|
|
|
|
|
|
|
|
|
|
|
|
// for bidirectional transitions, we start from the current position,
|
|
|
|
// for bidirectional transitions, we start from the current position,
|
|
|
|