Listening event of node selection v2 #396
-
Is it possible to add an eventhandler listening to node selections in baklava v2 with vuejs3 and composition api? Edit: a similar question was asked in V1, but the selectedNodes is no longer available #160 I saw in the documentation that nodes now have a prop “selected”: https://v2.baklava.tech/visual-editor/customization.html select (type: () => void) callback for node being selected. type: NodeTypes.SOURCE, I appreciate any suggestions. Keep up the great work! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
The selected nodes are now part of the graph. You can watch the selected nodes: const baklava = useBaklava();
watch(() => baklava.displayedGraph.selectedNodes, () => {
// your logic
}); |
Beta Was this translation helpful? Give feedback.
-
its not possible for me to access the .selectedNodes property.
I installed the lastest version of the library |
Beta Was this translation helpful? Give feedback.
The selected nodes are now part of the graph. You can watch the selected nodes: