refactor(flow): use computedPosition when checking inner bounds
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
+2
-2
@@ -241,11 +241,11 @@ export const getBoundsofRects = (rect1: Rect, rect2: Rect) => boxToRect(getBound
|
|||||||
|
|
||||||
export const getRectOfNodes = (nodes: GraphNode[]) => {
|
export const getRectOfNodes = (nodes: GraphNode[]) => {
|
||||||
const box = nodes.reduce(
|
const box = nodes.reduce(
|
||||||
(currBox, { position = { x: 0, y: 0 }, dimensions = { width: 0, height: 0 } } = {} as any) =>
|
(currBox, { computedPosition = { x: 0, y: 0 }, dimensions = { width: 0, height: 0 } } = {} as any) =>
|
||||||
getBoundsOfBoxes(
|
getBoundsOfBoxes(
|
||||||
currBox,
|
currBox,
|
||||||
rectToBox({
|
rectToBox({
|
||||||
...position,
|
...computedPosition,
|
||||||
...dimensions,
|
...dimensions,
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user