chore(examples): update examples with new API for add/remove
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import type { GraphNode } from '@vue-flow/core'
|
||||
import { getStraightPath } from '@vue-flow/core'
|
||||
import { computed } from '@vue/reactivity'
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = defineProps<{ sourceNode: GraphNode; sourceX: number; sourceY: number; targetX: number; targetY: number }>()
|
||||
|
||||
const edgePath = computed(() =>
|
||||
|
||||
@@ -43,11 +43,7 @@ const elements = ref<Elements>([
|
||||
},
|
||||
])
|
||||
|
||||
onConnect((params) => {
|
||||
console.log('connecting')
|
||||
|
||||
addEdges([params])
|
||||
})
|
||||
onConnect(addEdges)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user