feat: Assign default handle id and allow for actual loose connections

* When set to loose allow connections from all handles, this requires ids on handles so a default will be set if none provided
This commit is contained in:
Braks
2022-04-11 11:30:10 +02:00
parent ec0f3ef0e4
commit 158be8a515
4 changed files with 29 additions and 12 deletions
+2 -1
View File
@@ -152,7 +152,8 @@ export default (store: Store = useVueFlow().store) => {
const isOwnHandle = connection.source === connection.target
if (isValid && !isOwnHandle) {
onEdgeUpdate?.(connection)
if (!onEdgeUpdate) store.hooks.connect.trigger(connection)
else onEdgeUpdate(connection)
}
store.hooks.connectEnd.trigger(event)