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:
Braks
2024-11-01 19:48:16 +01:00
parent fe552fc5c5
commit cfc2332370
2 changed files with 8 additions and 2 deletions
@@ -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) {