pull/10798/head
Rich Harris 2 years ago
parent 1883b9880e
commit 02a62a2a97

@ -107,9 +107,6 @@ export function transition(flags, element, get_fn, get_params) {
let p = 0; let p = 0;
/** @type {0 | TRANSITION_IN | TRANSITION_OUT} */
let current_direction = 0;
/** @type {Animation | null} */ /** @type {Animation | null} */
let current_animation; let current_animation;
@ -249,13 +246,9 @@ export function transition(flags, element, get_fn, get_params) {
} }
if (intro) { if (intro) {
if (current_direction !== TRANSITION_IN) { start(1);
current_direction = TRANSITION_IN;
start(1);
}
} else { } else {
current_options?.tick?.(1, 0); current_options?.tick?.(1, 0);
current_direction = 0;
stop(); stop();
} }
}, },
@ -265,11 +258,8 @@ export function transition(flags, element, get_fn, get_params) {
callbacks.push(callback); callbacks.push(callback);
} }
if (current_direction !== TRANSITION_OUT) { element.inert = true;
current_direction = TRANSITION_OUT; start(0);
element.inert = true;
start(0);
}
} else { } else {
if (callback) { if (callback) {
callback(); callback();

Loading…
Cancel
Save