pull/3046/head
Richard Harris 6 years ago
parent 152c1cb1a5
commit d6a8b94d9f

@ -459,7 +459,7 @@ export default class EachBlockWrapper extends Wrapper {
const out = block.get_unique_name('out');
block.builders.init.add_block(deindent`
const ${out} = i => @transition_out(${iterations}[i], 1, 1, () => {
const ${out} = i => @transition_out(${iterations}[i], 1, () => {
${iterations}[i] = null;
});
`);

@ -326,7 +326,7 @@ export default class IfBlockWrapper extends Wrapper {
const destroy_old_block = deindent`
@group_outros();
@transition_out(${if_blocks}[${previous_block_index}], 1, 1, () => {
@transition_out(${if_blocks}[${previous_block_index}], 1, () => {
${if_blocks}[${previous_block_index}] = null;
});
@check_outros();
@ -439,7 +439,7 @@ export default class IfBlockWrapper extends Wrapper {
${enter}
} else if (${name}) {
@group_outros();
@transition_out(${name}, 1, 1, () => {
@transition_out(${name}, 1, () => {
${name} = null;
});
@check_outros();

@ -423,7 +423,7 @@ export default class InlineComponentWrapper extends Wrapper {
if (${name}) {
@group_outros();
const old_component = ${name};
@transition_out(old_component.$$.fragment, 1, 1, () => {
@transition_out(old_component.$$.fragment, 1, () => {
@destroy_component(old_component);
});
@check_outros();
@ -457,7 +457,7 @@ export default class InlineComponentWrapper extends Wrapper {
}
block.builders.outro.add_line(
`if (${name}) @transition_out(${name}.$$.fragment, 0, #local);`
`if (${name}) @transition_out(${name}.$$.fragment, #local);`
);
block.builders.destroy.add_line(`if (${name}) @destroy_component(${name}, ${parent_node ? '' : 'detaching'});`);
@ -504,7 +504,7 @@ export default class InlineComponentWrapper extends Wrapper {
`);
block.builders.outro.add_line(
`@transition_out(${name}.$$.fragment, 0, #local);`
`@transition_out(${name}.$$.fragment, #local);`
);
}
}

@ -146,7 +146,7 @@ export default class SlotWrapper extends Wrapper {
);
block.builders.outro.add_line(
`@transition_out(${slot}, 0, #local);`
`@transition_out(${slot}, #local);`
);
let update_conditions = [...this.dependencies].map(name => `changed.${name}`).join(' || ');

@ -18,7 +18,7 @@ export function handle_promise(promise, info) {
info.blocks.forEach((block, i) => {
if (i !== index && block) {
group_outros();
transition_out(block, 1, 1, () => {
transition_out(block, 1, () => {
info.blocks[i] = null;
});
check_outros();

@ -6,7 +6,7 @@ export function destroy_block(block, lookup) {
}
export function outro_and_destroy_block(block, lookup) {
transition_out(block, 1, 1, () => {
transition_out(block, 1, () => {
destroy_block(block, lookup);
});
}

@ -46,15 +46,17 @@ export function transition_in(block, local?: 0 | 1) {
}
}
export function transition_out(block, detaching: 0 | 1, local: 0 | 1, callback) {
export function transition_out(block, local: 0 | 1, callback) {
if (block && block.o) {
if (outroing.has(block)) return;
outroing.add(block);
outros.callbacks.push(() => {
outroing.delete(block);
if (detaching) block.d(detaching);
if (callback) callback();
if (callback) {
block.d(1);
callback();
}
});
block.o(local);

@ -35,7 +35,7 @@ function create_fragment(ctx) {
},
o(local) {
transition_out(nested.$$.fragment, 0, local);
transition_out(nested.$$.fragment, local);
current = false;
},

@ -35,7 +35,7 @@ function create_fragment(ctx) {
},
o(local) {
transition_out(nested.$$.fragment, 0, local);
transition_out(nested.$$.fragment, local);
current = false;
},

@ -35,7 +35,7 @@ function create_fragment(ctx) {
},
o(local) {
transition_out(nested.$$.fragment, 0, local);
transition_out(nested.$$.fragment, local);
current = false;
},

@ -35,7 +35,7 @@ function create_fragment(ctx) {
},
o(local) {
transition_out(nested.$$.fragment, 0, local);
transition_out(nested.$$.fragment, local);
current = false;
},

@ -36,7 +36,7 @@ function create_fragment(ctx) {
},
o(local) {
transition_out(lazyload.$$.fragment, 0, local);
transition_out(lazyload.$$.fragment, local);
current = false;
},

@ -47,8 +47,8 @@ function create_fragment(ctx) {
},
o(local) {
transition_out(imported.$$.fragment, 0, local);
transition_out(nonimported.$$.fragment, 0, local);
transition_out(imported.$$.fragment, local);
transition_out(nonimported.$$.fragment, local);
current = false;
},

@ -81,7 +81,7 @@ function create_fragment(ctx) {
}
} else if (if_block) {
group_outros();
transition_out(if_block, 1, 1, () => {
transition_out(if_block, 1, () => {
if_block = null;
});
check_outros();

Loading…
Cancel
Save