From 0c07bd4e2ad7164b774607fe2d62ac2929f27c95 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Thu, 9 Nov 2023 10:38:16 +0100 Subject: [PATCH] fix(core): use node rect for intersection check --- packages/core/src/store/actions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/store/actions.ts b/packages/core/src/store/actions.ts index a1f8e7a0..9068eabb 100644 --- a/packages/core/src/store/actions.ts +++ b/packages/core/src/store/actions.ts @@ -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) => {