1
0
Fork 0
mirror of synced 2024-07-04 14:01:27 +12:00

Add better animations when editing workflow blocks and changing workflows

This commit is contained in:
Andrew Kingston 2020-09-11 14:31:01 +01:00
parent bee9415942
commit 715c0ab170
2 changed files with 19 additions and 11 deletions

View file

@ -19,12 +19,18 @@
}
</script>
<section>
<section class="canvas">
{#each blocks as block, idx (block.id)}
<FlowItem {onSelect} {block} />
{#if idx !== blocks.length - 1}
<Arrow />
{/if}
<div
class="block"
animate:flip={{ duration: 600 }}
in:fade
out:fly={{ x: 100 }}>
<FlowItem {onSelect} {block} />
{#if idx !== blocks.length - 1}
<Arrow />
{/if}
</div>
{/each}
</section>
@ -36,4 +42,11 @@
align-items: center;
flex-direction: column;
}
.block {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
}
</style>

View file

@ -1,6 +1,5 @@
<script>
import mustache from "mustache"
import { fade } from "svelte/transition"
import { workflowStore } from "builderStore"
export let onSelect
@ -16,11 +15,7 @@
}
</script>
<div
transition:fade
class={`${block.type} hoverable`}
class:selected
on:click={selectBlock}>
<div class={`${block.type} hoverable`} class:selected on:click={selectBlock}>
<header>
{#if block.type === 'TRIGGER'}
<i class="ri-lightbulb-fill" />