fix(edges): use derived store for edge handling
This commit is contained in:
@@ -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} />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user