feat(svelte) added connectionLineComponent

This commit is contained in:
Peter
2023-09-26 15:45:06 +02:00
parent c251b9ee29
commit bba97aa01a
6 changed files with 90 additions and 5 deletions
@@ -8,8 +8,10 @@
{#if $connectionPath}
<svg width={$width} height={$height} class="svelte-flow__connectionline">
<g class={cc(['svelte-flow__connection', $connection.connectionStatus])}>
<path d={$connectionPath} fill="none" class="svelte-flow__connection-path" />
</g>
<slot name="connectionLineComponent">
<g class={cc(['svelte-flow__connection', $connection.connectionStatus])}>
<path d={$connectionPath} fill="none" class="svelte-flow__connection-path" />
</g>
</slot>
</svg>
{/if}
@@ -154,7 +154,9 @@
<Pane on:paneclick panOnDrag={panOnDrag === undefined ? true : panOnDrag}>
<ViewportComponent>
<EdgeRenderer on:edgeclick on:edgecontextmenu />
<ConnectionLine />
<ConnectionLine>
<slot name="connectionLineComponent" slot="connectionLineComponent" />
</ConnectionLine>
<div class="svelte-flow__edgelabel-renderer" />
<NodeRenderer
on:nodeclick