fix(core): use connecting handle to update connection (#1996)

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2025-12-12 11:48:05 +01:00
parent 1b15e24bb3
commit 474e830d08
2 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"@vue-flow/core": patch
---
Use the connecting handle result when updating a connection, so we get an accurate connection position for `toPosition`.

View File

@@ -244,6 +244,7 @@ export function useHandle({
} }
const connectingHandle = closestHandle ?? result.toHandle const connectingHandle = closestHandle ?? result.toHandle
updateConnection( updateConnection(
connectingHandle && isValid connectingHandle && isValid
? rendererPointToPoint( ? rendererPointToPoint(
@@ -254,7 +255,7 @@ export function useHandle({
viewport.value, viewport.value,
) )
: connectionPosition, : connectionPosition,
result.toHandle, connectingHandle,
getConnectionStatus(!!connectingHandle, isValid), getConnectionStatus(!!connectingHandle, isValid),
) )