fix(edges): use derived store for edge handling

This commit is contained in:
moklick
2023-02-01 15:25:14 +01:00
parent 2af833aee1
commit 71bd05b7e7
10 changed files with 243 additions and 215 deletions
@@ -0,0 +1,28 @@
<script lang="ts">
import Edge from '$lib/components/edges/BaseEdge.svelte';
import { useStore } from '$lib/store';
const { edgesWithDataStore, widthStore, heightStore } = useStore();
</script>
<svg
width={$widthStore}
height={$heightStore}
class="react-flow__edges react-flow__container"
>
{#each $edgesWithDataStore as edge}
<Edge {...edge} />
{/each}
</svg>
<style>
.react-flow__edges {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
pointer-events: none;
overflow: visible;
}