fix(core): consider handle dimensions when checking for closest handle

This commit is contained in:
braks
2023-06-15 22:35:25 +02:00
committed by Braks
parent 82befe722a
commit f3931a2c05
2 changed files with 14 additions and 12 deletions
+2 -2
View File
@@ -155,7 +155,7 @@ export function useHandle({
),
)
closestHandle = handle
closestHandle = handle || handleLookup.find((handle) => handle.id === validHandleResult.endHandle?.handleId) || null
if (!autoPanStarted) {
autoPan()
@@ -198,7 +198,7 @@ export function useHandle({
}
function onPointerUp(event: MouseTouchEvent) {
if ((closestHandle || handleDomNode || connectionEndHandle.value) && connection && isValid) {
if ((closestHandle || handleDomNode) && connection && isValid) {
if (!onEdgeUpdate) {
emits.connect(connection)
} else {