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:
5
.changeset/afraid-lies-deny.md
Normal file
5
.changeset/afraid-lies-deny.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@vue-flow/core": patch
|
||||
---
|
||||
|
||||
Calculate overlapping area in getNodeIntersections correctly.
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user