refactor(core): pass original event to edge update event params

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-02-15 00:24:22 +01:00
committed by Braks
parent 09c56a60b3
commit 83636d4e53
4 changed files with 19 additions and 27 deletions
@@ -1,10 +1,8 @@
<script lang="ts" setup>
import type { Elements } from '@vue-flow/core'
<script setup>
import { VueFlow } from '@vue-flow/core'
import { Background, BackgroundVariant } from '@vue-flow/background'
import ConnectionLine from './ConnectionLine.vue'
const elements = ref<Elements>([
const elements = ref([
{
id: '1',
type: 'input',
@@ -16,9 +14,8 @@ const elements = ref<Elements>([
<template>
<VueFlow v-model="elements">
<template #connection-line="props">
<ConnectionLine v-bind="props" />
<template #connection-line="{ sourceX, sourceY, targetX, targetY }">
<ConnectionLine :source-x="sourceX" :source-y="sourceY" :target-x="targetX" :target-y="targetY" />
</template>
<Background :variant="BackgroundVariant.Lines" />
</VueFlow>
</template>