|
|
|
@ -702,7 +702,7 @@ export default class Element extends Node {
|
|
|
|
|
|
|
|
|
|
block.builders.intro.addBlock(deindent`
|
|
|
|
|
#component.root._aftercreate.push(() => {
|
|
|
|
|
if (!${name}) ${name} = @wrapTransition(#component, ${this.var}, ${fn}, ${snippet}, true, null);
|
|
|
|
|
if (!${name}) ${name} = @wrapTransition(#component, ${this.var}, ${fn}, ${snippet}, true);
|
|
|
|
|
${name}.run(1);
|
|
|
|
|
});
|
|
|
|
|
`);
|
|
|
|
@ -734,7 +734,7 @@ export default class Element extends Node {
|
|
|
|
|
|
|
|
|
|
block.builders.intro.addBlock(deindent`
|
|
|
|
|
#component.root._aftercreate.push(() => {
|
|
|
|
|
${introName} = @wrapTransition(#component, ${this.var}, ${fn}, ${snippet}, true, null);
|
|
|
|
|
${introName} = @wrapTransition(#component, ${this.var}, ${fn}, ${snippet}, true);
|
|
|
|
|
${introName}.run(1);
|
|
|
|
|
});
|
|
|
|
|
`);
|
|
|
|
@ -751,7 +751,7 @@ export default class Element extends Node {
|
|
|
|
|
// TODO hide elements that have outro'd (unless they belong to a still-outroing
|
|
|
|
|
// group) prior to their removal from the DOM
|
|
|
|
|
block.builders.outro.addBlock(deindent`
|
|
|
|
|
${outroName} = @wrapTransition(#component, ${this.var}, ${fn}, ${snippet}, false, null);
|
|
|
|
|
${outroName} = @wrapTransition(#component, ${this.var}, ${fn}, ${snippet}, false);
|
|
|
|
|
${outroName}.run(0, () => {
|
|
|
|
|
${block.outros > 1 ? `if (--#outros === 0) #outrocallback();` : `#outrocallback();`}
|
|
|
|
|
});
|
|
|
|
|