fix(svelte) corrected <g> positioning

This commit is contained in:
Peter
2023-09-27 16:02:46 +02:00
parent 1d8fc1bfaf
commit 79ab4cb3e0
2 changed files with 7 additions and 8 deletions

View File

@@ -5,7 +5,5 @@
</script>
{#if $connection.path}
<g class={$connection.status}>
<path d={$connection.path} fill="none" stroke={$connection.startHandle?.handleId} />
</g>
<path d={$connection.path} fill="none" stroke={$connection.startHandle?.handleId} />
{/if}

View File

@@ -12,11 +12,12 @@
{#if $connection.path}
<svg width={$width} height={$height} class="svelte-flow__connectionline" style={containerStyle}>
<slot name="connectionLine" />
{#if !usingCustomLine}
<g class={cc(['svelte-flow__connection', $connection.status])} {style}>
<g class={cc(['svelte-flow__connection', $connection.status])} {style}>
<slot name="connectionLine" />
<!-- slot fallbacks do not work if slots are forwarded in parent -->
{#if !usingCustomLine}
<path d={$connection.path} fill="none" class="svelte-flow__connection-path" />
</g>
{/if}
{/if}
</g>
</svg>
{/if}