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
+3 -2
View File
@@ -14,14 +14,15 @@ const elements = ref<Elements>([
{ id: 'e1-2', source: '1', target: '2', animated: true },
{ id: 'e1-3', source: '1', target: '3' },
])
const { onNodeDragStop, onConnect, addEdges, setTransform, toObject } = useVueFlow({
const { onNodeDragStop, onEdgeClick, onConnect, addEdges, setTransform, toObject } = useVueFlow({
minZoom: 0.2,
maxZoom: 4,
connectOnClick: true,
fitViewOnInit: false,
})
onNodeDragStop((e) => console.log('drag stop', e))
onNodeDragStop((e) => console.log('drag stop', e.event))
onEdgeClick(console.log)
onConnect((params) => addEdges([params]))
const updatePos = () =>