chore(examples): cleanup
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -14,13 +14,12 @@ const elements = ref<Elements>([
|
|||||||
{ id: 'e1-2', source: '1', target: '2', animated: true },
|
{ id: 'e1-2', source: '1', target: '2', animated: true },
|
||||||
{ id: 'e1-3', source: '1', target: '3' },
|
{ id: 'e1-3', source: '1', target: '3' },
|
||||||
])
|
])
|
||||||
const { onNodeDragStop, onEdgeClick, onConnect, addEdges, setTransform, toObject } = useVueFlow({
|
|
||||||
|
const { onConnect, addEdges, setTransform, toObject } = useVueFlow({
|
||||||
minZoom: 0.2,
|
minZoom: 0.2,
|
||||||
maxZoom: 4,
|
maxZoom: 4,
|
||||||
})
|
})
|
||||||
|
|
||||||
onNodeDragStop((e) => console.log('drag stop', e.event))
|
|
||||||
onEdgeClick(console.log)
|
|
||||||
onConnect((params) => addEdges([params]))
|
onConnect((params) => addEdges([params]))
|
||||||
|
|
||||||
function updatePos() {
|
function updatePos() {
|
||||||
@@ -46,7 +45,7 @@ function toggleclass() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VueFlow v-model="elements" fit-view-on-init connection-mode="strict" class="vue-flow-basic-example">
|
<VueFlow v-model="elements" fit-view-on-init class="vue-flow-basic-example">
|
||||||
<Background />
|
<Background />
|
||||||
<MiniMap />
|
<MiniMap />
|
||||||
<Controls />
|
<Controls />
|
||||||
|
|||||||
Reference in New Issue
Block a user