fix(core): use all handle bounds in loose connection mode (#1665)
* fix(core): use all handle bounds with loose mode when updating edges Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(changeset): add Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> --------- Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
5
.changeset/smart-lies-impress.md
Normal file
5
.changeset/smart-lies-impress.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@vue-flow/core": patch
|
||||
---
|
||||
|
||||
Use all handle bounds when using loose connection mode during edge update
|
||||
@@ -62,10 +62,11 @@ const ConnectionLine = defineComponent({
|
||||
const handleType = connectionStartHandle.value.type
|
||||
|
||||
const fromHandleBounds = fromNode.value.handleBounds
|
||||
let handleBounds = fromHandleBounds?.[handleType]
|
||||
let handleBounds = fromHandleBounds?.[handleType] || []
|
||||
|
||||
if (connectionMode.value === ConnectionMode.Loose) {
|
||||
handleBounds = handleBounds || fromHandleBounds?.[handleType === 'source' ? 'target' : 'source']
|
||||
const oppositeBounds = fromHandleBounds?.[handleType === 'source' ? 'target' : 'source'] || []
|
||||
handleBounds = [...handleBounds, ...oppositeBounds] || oppositeBounds
|
||||
}
|
||||
|
||||
if (!handleBounds) {
|
||||
|
||||
Reference in New Issue
Block a user