feat(edges): Use slot injection for custom edges

This commit is contained in:
Braks
2022-04-04 21:42:48 +02:00
parent 307917011a
commit 3f15983f3e
5 changed files with 40 additions and 57 deletions
@@ -19,10 +19,6 @@ export default {
:selectable="typeof node.selectable === 'undefined' ? store.elementsSelectable : !!node.selectable"
:connectable="typeof node.connectable === 'undefined' ? store.nodesConnectable : !!node.connectable"
:snap-grid="node.snapGrid ?? (store.snapToGrid ? store.snapGrid : undefined)"
>
<template #default="nodeProps">
<slot v-if="node.type" :name="`node-${node.type}`" v-bind="nodeProps"></slot>
</template>
</NodeWrapper>
/>
</div>
</template>