pull/17293/head
Rich Harris 4 days ago
parent 21247df1e4
commit f5b03328bb

@ -397,7 +397,7 @@ function reconcile(state, array, anchor, flags, get_key) {
// offscreen == coming in now, no animation in that case, // offscreen == coming in now, no animation in that case,
// else this would happen https://github.com/sveltejs/svelte/issues/17181 // else this would happen https://github.com/sveltejs/svelte/issues/17181
if (item.o) { if (item.o) {
item.a?.measure(); item.e.nodes?.a?.measure();
(to_animate ??= new Set()).add(item); (to_animate ??= new Set()).add(item);
} }
} }
@ -432,7 +432,7 @@ function reconcile(state, array, anchor, flags, get_key) {
if ((item.e.f & INERT) !== 0) { if ((item.e.f & INERT) !== 0) {
resume_effect(item.e); resume_effect(item.e);
if (is_animated) { if (is_animated) {
item.a?.unfix(); item.e.nodes?.a?.unfix();
(to_animate ??= new Set()).delete(item); (to_animate ??= new Set()).delete(item);
} }
} }
@ -529,11 +529,11 @@ function reconcile(state, array, anchor, flags, get_key) {
if (is_animated) { if (is_animated) {
for (i = 0; i < destroy_length; i += 1) { for (i = 0; i < destroy_length; i += 1) {
to_destroy[i].a?.measure(); to_destroy[i].e.nodes?.a?.measure();
} }
for (i = 0; i < destroy_length; i += 1) { for (i = 0; i < destroy_length; i += 1) {
to_destroy[i].a?.fix(); to_destroy[i].e.nodes?.a?.fix();
} }
} }
@ -557,7 +557,7 @@ function reconcile(state, array, anchor, flags, get_key) {
queue_micro_task(() => { queue_micro_task(() => {
if (to_animate === undefined) return; if (to_animate === undefined) return;
for (item of to_animate) { for (item of to_animate) {
item.a?.apply(); item.e.nodes?.a?.apply();
} }
}); });
} }

@ -84,8 +84,6 @@ export type EachState = {
}; };
export type EachItem = { export type EachItem = {
/** animation manager */
a: AnimationManager | null;
/** effect */ /** effect */
e: Effect; e: Effect;
/** item */ /** item */

Loading…
Cancel
Save