Skip to content

Commit 11f92f4

Browse files
committed
chore(docs): update interaction example
1 parent 02057b6 commit 11f92f4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/examples/interaction/App.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
<script setup>
2-
import { VueFlow } from '@vue-flow/core'
32
import { ref } from 'vue'
3+
import { VueFlow } from '@vue-flow/core'
44
import InteractionControls from './InteractionControls.vue'
55
6-
const elements = ref([
6+
const nodes = ref([
77
{ id: '1', type: 'input', label: 'Node 1', position: { x: 250, y: 5 } },
88
{ id: '2', label: 'Node 2', position: { x: 100, y: 100 } },
99
{ id: '3', label: 'Node 3', position: { x: 400, y: 100 } },
1010
{ id: '4', label: 'Node 4', position: { x: 400, y: 200 } },
11+
])
12+
13+
const edges = ref([
1114
{ id: 'e1-2', source: '1', target: '2', animated: true },
1215
{ id: 'e1-3', source: '1', target: '3' },
1316
])
1417
</script>
1518

1619
<template>
17-
<VueFlow v-model="elements" class="interactionflow" fit-view-on-init>
20+
<VueFlow :nodes="nodes" :edges="edges" class="interactionflow" fit-view-on-init>
1821
<InteractionControls />
1922
</VueFlow>
2023
</template>

0 commit comments

Comments
 (0)