fix(core): use node rect for intersection check

This commit is contained in:
braks
2023-11-09 14:19:51 +01:00
committed by Braks
parent 91c521296d
commit 0c07bd4e2a
+2 -2
View File
@@ -670,7 +670,7 @@ export function useActions(
const overlappingArea = getOverlappingArea(currNodeRect, nodeRect)
const partiallyVisible = partially && overlappingArea > 0
return partiallyVisible || overlappingArea >= Number(nodeOrRect.width) * Number(nodeOrRect.height)
return partiallyVisible || overlappingArea >= Number(nodeRect.width) * Number(nodeRect.height)
})
}
@@ -684,7 +684,7 @@ export function useActions(
const overlappingArea = getOverlappingArea(nodeRect, area)
const partiallyVisible = partially && overlappingArea > 0
return partiallyVisible || overlappingArea >= Number(nodeOrRect.width) * Number(nodeOrRect.height)
return partiallyVisible || overlappingArea >= Number(nodeRect.width) * Number(nodeRect.height)
}
const panBy: Actions['panBy'] = (delta) => {