refactor(svelte): cleanup store usage

This commit is contained in:
moklick
2023-02-28 12:43:29 +01:00
parent 7a879f3c54
commit 62a6278682
25 changed files with 420 additions and 397 deletions
@@ -6,17 +6,17 @@
type $$Props = ConnectionLineProps;
const { connectionPathStore, widthStore, heightStore, connectionStore } = useStore();
const { connectionPath, width, height, connection } = useStore();
</script>
{#if $connectionPathStore}
{#if $connectionPath}
<svg
width={$widthStore}
height={$heightStore}
width={$width}
height={$height}
class="react-flow__connectionline"
>
<g class={cc(['react-flow__connection', $connectionStore.status])}>
<path d={$connectionPathStore} fill="none" class="react-flow__connection-path" />
<g class={cc(['react-flow__connection', $connection.status])}>
<path d={$connectionPath} fill="none" class="react-flow__connection-path" />
</g>
</svg>
{/if}