refactor(core): first check element below

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-02-01 22:57:05 +01:00
committed by Braks
parent c7cfcec70a
commit 94e1282b10
2 changed files with 31 additions and 24 deletions
@@ -113,6 +113,7 @@ export default function useHandle({
}
const { connection, handleDomNode, isValid } = isValidHandle(
event,
prevClosestHandle,
connectionMode.value,
nodeId,
@@ -133,6 +134,7 @@ export default function useHandle({
function onPointerUp(event: MouseEvent | TouchEvent) {
if (prevClosestHandle) {
const { connection, isValid } = isValidHandle(
event,
prevClosestHandle,
connectionMode.value,
nodeId,
@@ -186,6 +188,7 @@ export default function useHandle({
const doc = getHostForElement(event.target as HTMLElement)
const { connection, isValid } = isValidHandle(
event,
{
nodeId,
id: handleId,