feat(edges): Use slot injection for custom connection lines
This commit is contained in:
@@ -52,11 +52,7 @@ export default {
|
||||
<slot v-if="edge.type" :name="`edge-${edge.type}`" v-bind="edgeProps"></slot>
|
||||
</template>
|
||||
</EdgeWrapper>
|
||||
<ConnectionLine v-if="connectionLineVisible && sourceNode" :source-node="sourceNode">
|
||||
<template #default="customConnectionLineProps">
|
||||
<slot name="connection-line" v-bind="customConnectionLineProps"></slot>
|
||||
</template>
|
||||
</ConnectionLine>
|
||||
<ConnectionLine v-if="connectionLineVisible && sourceNode" :source-node="sourceNode" />
|
||||
</g>
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
@@ -35,8 +35,7 @@ const transform = computed(() => `translate(${store.transform[0]}px,${store.tran
|
||||
<template>
|
||||
<div :key="`transformation-pane-${id}`" class="vue-flow__transformation-pane vue-flow__container" :style="{ transform }">
|
||||
<NodeRenderer v-if="store.getNodes.length" :key="`node-renderer-${id}`" />
|
||||
<EdgeRenderer :key="`edge-renderer-${id}`">
|
||||
</EdgeRenderer>
|
||||
<EdgeRenderer :key="`edge-renderer-${id}`" />
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user