feat(svelte): add BaseEdge and EdgeLabelRenderer

This commit is contained in:
moklick
2023-02-23 18:21:39 +01:00
parent bb528e6798
commit 1dd5613482
15 changed files with 225 additions and 122 deletions
@@ -1,5 +1,5 @@
<script lang="ts">
import Edge from '$lib/components/edges/BaseEdge.svelte';
import EdgeWrapper from '$lib/components/edges/EdgeWrapper.svelte';
import { useStore } from '$lib/store';
const { edgesWithDataStore, widthStore, heightStore } = useStore();
@@ -8,10 +8,10 @@
<svg
width={$widthStore}
height={$heightStore}
height={$heightStore}
class="react-flow__edges"
>
{#each $edgesWithDataStore as edge (edge.id)}
{#each $edgesWithDataStore as edge (edge.id)}
<EdgeWrapper {...edge} />
{/each}
</svg>