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
@@ -5,9 +5,6 @@
export let sourceY: number = 0;
export let targetX: number = 0;
export let targetY: number = 0;
const path = `M ${sourceX},${sourceY}L ${targetX},${targetY}`;
</script>
<g
@@ -15,7 +12,7 @@
data-id={id}
>
<path
d={path}
d={`M ${sourceX},${sourceY}L ${targetX},${targetY}`}
fill="none"
class="react-flow__edge-path"
/>
@@ -44,7 +44,7 @@
.react-flow__node {
padding: 10px;
border-radius: 3px;
width: var(--node-width);
width: 50px;
font-size: 12px;
color: #222;
text-align: center;
@@ -10,6 +10,6 @@
</script>
<Handle type="target" position={targetPosition} />
{data?.label}
{data?.label}
<Handle type="source" position={sourcePosition} />