fix(core): prioritize handle below during handle lookup

This commit is contained in:
braks
2023-07-10 19:20:26 +02:00
committed by Braks
parent 0b60cc3c3e
commit 245dd82574
3 changed files with 55 additions and 12 deletions
+3 -1
View File
@@ -136,6 +136,8 @@ export function useHandle({
connectionPosition = getEventPosition(event, containerBounds)
const { handle, validHandleResult } = getClosestHandle(
event,
doc,
pointToRendererPoint(connectionPosition, viewport.value, false, [1, 1]),
connectionRadius.value,
handleLookup,
@@ -154,7 +156,7 @@ export function useHandle({
),
)
closestHandle = handle || handleLookup.find((handle) => handle.id === validHandleResult.endHandle?.handleId) || null
closestHandle = handle
if (!autoPanStarted) {
autoPan()