fix(core): calculate overlapping area correctly (#1914)

* fix(core): calculate overlapping area correctly

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(changeset): add

---------

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2025-08-07 15:32:08 +02:00
parent ed18865525
commit e97a65b6b5
2 changed files with 10 additions and 1 deletions

View File

@@ -662,7 +662,11 @@ export function useActions(state: State, nodeLookup: ComputedRef<NodeLookup>, ed
const overlappingArea = getOverlappingArea(currNodeRect, nodeRect)
const partiallyVisible = partially && overlappingArea > 0
if (partiallyVisible || overlappingArea >= Number(nodeRect.width) * Number(nodeRect.height)) {
if (
partiallyVisible ||
overlappingArea >= currNodeRect.width * currNodeRect.height ||
overlappingArea >= Number(nodeRect.width) * Number(nodeRect.height)
) {
intersections.push(n)
}
}