Skip to content

Commit 0c07bd4

Browse files
committed
fix(core): use node rect for intersection check
1 parent 91c5212 commit 0c07bd4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/store/actions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ export function useActions(
670670
const overlappingArea = getOverlappingArea(currNodeRect, nodeRect)
671671
const partiallyVisible = partially && overlappingArea > 0
672672

673-
return partiallyVisible || overlappingArea >= Number(nodeOrRect.width) * Number(nodeOrRect.height)
673+
return partiallyVisible || overlappingArea >= Number(nodeRect.width) * Number(nodeRect.height)
674674
})
675675
}
676676

@@ -684,7 +684,7 @@ export function useActions(
684684
const overlappingArea = getOverlappingArea(nodeRect, area)
685685
const partiallyVisible = partially && overlappingArea > 0
686686

687-
return partiallyVisible || overlappingArea >= Number(nodeOrRect.width) * Number(nodeOrRect.height)
687+
return partiallyVisible || overlappingArea >= Number(nodeRect.width) * Number(nodeRect.height)
688688
}
689689

690690
const panBy: Actions['panBy'] = (delta) => {

0 commit comments

Comments
 (0)