fix: Edge updates not triggering properly

update(types): Add FlowEvents type
This commit is contained in:
Braks
2021-10-22 10:46:12 +02:00
parent c23bbfaa4a
commit 3ee3843af6
3 changed files with 46 additions and 44 deletions
+2
View File
@@ -81,6 +81,7 @@ export default () => {
return true
},
elementEdgeUpdaterType?: HandleType,
onEdgeUpdate?: (connection: Connection) => void,
) => {
const flowNode = (event.target as Element).closest('.vue-flow')
// when vue-flow is used inside a shadow root we can't use document
@@ -150,6 +151,7 @@ export default () => {
if (isValid) {
hooks.connect.trigger(connection)
onEdgeUpdate?.(connection)
}
hooks.connectEnd.trigger(event)