Skip to content

Commit 474e830

Browse files
committed
fix(core): use connecting handle to update connection (#1996)
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
1 parent 1b15e24 commit 474e830

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/giant-pants-jam.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vue-flow/core": patch
3+
---
4+
5+
Use the connecting handle result when updating a connection, so we get an accurate connection position for `toPosition`.

packages/core/src/composables/useHandle.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ export function useHandle({
244244
}
245245

246246
const connectingHandle = closestHandle ?? result.toHandle
247+
247248
updateConnection(
248249
connectingHandle && isValid
249250
? rendererPointToPoint(
@@ -254,7 +255,7 @@ export function useHandle({
254255
viewport.value,
255256
)
256257
: connectionPosition,
257-
result.toHandle,
258+
connectingHandle,
258259
getConnectionStatus(!!connectingHandle, isValid),
259260
)
260261

0 commit comments

Comments
 (0)