|
|
|
|
@ -57,9 +57,8 @@ export function index(_, i) {
|
|
|
|
|
* subsequent destruction. Used in each blocks
|
|
|
|
|
* @param {import('#client').EachItem[]} items
|
|
|
|
|
* @param {null | Node} controlled_anchor
|
|
|
|
|
* @param {() => void} [callback]
|
|
|
|
|
*/
|
|
|
|
|
function pause_effects(items, controlled_anchor, callback) {
|
|
|
|
|
function pause_effects(items, controlled_anchor) {
|
|
|
|
|
/** @type {import('#client').TransitionManager[]} */
|
|
|
|
|
var transitions = [];
|
|
|
|
|
var length = items.length;
|
|
|
|
|
@ -81,10 +80,10 @@ function pause_effects(items, controlled_anchor, callback) {
|
|
|
|
|
|
|
|
|
|
run_out_transitions(transitions, () => {
|
|
|
|
|
for (var i = 0; i < length; i++) {
|
|
|
|
|
destroy_effect(items[i].e, !is_controlled);
|
|
|
|
|
var item = items[i];
|
|
|
|
|
link(item.prev, item.next);
|
|
|
|
|
destroy_effect(item.e, !is_controlled);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (callback !== undefined) callback();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -399,13 +398,7 @@ function reconcile(array, state, anchor, render_fn, flags, get_key) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pause_effects(to_destroy, controlled_anchor, () => {
|
|
|
|
|
for (var i = 0; i < destroy_length; i += 1) {
|
|
|
|
|
var item = to_destroy[i];
|
|
|
|
|
items.delete(item.k);
|
|
|
|
|
link(item.prev, item.next);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
pause_effects(to_destroy, controlled_anchor);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (is_animated) {
|
|
|
|
|
|