Add better animations when editing workflow blocks and changing workflows
This commit is contained in:
parent
bee9415942
commit
715c0ab170
|
@ -19,12 +19,18 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<section>
|
<section class="canvas">
|
||||||
{#each blocks as block, idx (block.id)}
|
{#each blocks as block, idx (block.id)}
|
||||||
<FlowItem {onSelect} {block} />
|
<div
|
||||||
{#if idx !== blocks.length - 1}
|
class="block"
|
||||||
<Arrow />
|
animate:flip={{ duration: 600 }}
|
||||||
{/if}
|
in:fade
|
||||||
|
out:fly={{ x: 100 }}>
|
||||||
|
<FlowItem {onSelect} {block} />
|
||||||
|
{#if idx !== blocks.length - 1}
|
||||||
|
<Arrow />
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -36,4 +42,11 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.block {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import mustache from "mustache"
|
import mustache from "mustache"
|
||||||
import { fade } from "svelte/transition"
|
|
||||||
import { workflowStore } from "builderStore"
|
import { workflowStore } from "builderStore"
|
||||||
|
|
||||||
export let onSelect
|
export let onSelect
|
||||||
|
@ -16,11 +15,7 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div class={`${block.type} hoverable`} class:selected on:click={selectBlock}>
|
||||||
transition:fade
|
|
||||||
class={`${block.type} hoverable`}
|
|
||||||
class:selected
|
|
||||||
on:click={selectBlock}>
|
|
||||||
<header>
|
<header>
|
||||||
{#if block.type === 'TRIGGER'}
|
{#if block.type === 'TRIGGER'}
|
||||||
<i class="ri-lightbulb-fill" />
|
<i class="ri-lightbulb-fill" />
|
||||||
|
|
Loading…
Reference in New Issue