Revert "cancel outro before update"

This reverts commit 486a9baea5.
pull/4634/head
pushkine 6 years ago
parent 3057d9eecd
commit 1203b9e2e8

@ -522,13 +522,13 @@ export default class IfBlockWrapper extends Wrapper {
const enter = b`
if (${name}) {
${dynamic && b`${name}.p(#ctx, #dirty);`}
${
has_transitions &&
b`if (${block.renderer.dirty(branch.dependencies)}) {
@transition_in(${name}, 1);
}`
}
${dynamic && b`${name}.p(#ctx, #dirty);`}
} else {
${name} = ${branch.block.name}(#ctx);
${name}.c();

@ -1,10 +0,0 @@
export default {
async test({ assert, target, window, raf }) {
const button = target.querySelector("button");
const event = new window.MouseEvent("click");
assert.htmlEqual(target.innerHTML, "A");
await button.dispatchEvent(event);
raf.tick(500);
assert.htmlEqual(target.innerHTML, "A");
},
};

@ -1,36 +0,0 @@
<script>
import Component from "./Component.svelte";
function foo(node, params) {
return {
duration: 100,
tick: t => {
node.foo = t;
}
};
}
let isFirst = true;
let animationActive = false;
const toggle = () => {
if (animationActive) {
return;
}
animationActive = true;
Promise.resolve().then(() => {
isFirst = !isFirst;
animationActive = false;
});
};
</script>
<button on:click={toggle}>TOGGLE</button>
{#if !animationActive}
<div out:foo>
{#if isFirst}
<Component {isFirst} />
{:else}
<Component {isFirst} />
{/if}
</div>
{/if}
Loading…
Cancel
Save