feat(flow): Add event listener to vueflow object

* event listener also exist in store state (hooksOn)
* add applyChangesHandlers to vueflow object, can be used to apply changes i.e. deleting etc.

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent a604dd8ab1
commit d875cfede3
5 changed files with 54 additions and 10 deletions
+3 -1
View File
@@ -96,6 +96,8 @@ export default (options?: FlowOptions): UseVueFlow => {
const store = useStore(options)
return {
store,
hooks: store.hooks,
applyNodeChanges: (changes) => applyNodeChanges(changes, store.nodes),
applyEdgeChanges: (changes) => applyEdgeChanges(changes, store.edges),
...store.hooksOn,
}
}