refactor(flow): use computedPosition when checking inner bounds

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent 7cb6192591
commit b365e947e1
+2 -2
View File
@@ -241,11 +241,11 @@ export const getBoundsofRects = (rect1: Rect, rect2: Rect) => boxToRect(getBound
export const getRectOfNodes = (nodes: GraphNode[]) => {
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(
currBox,
rectToBox({
...position,
...computedPosition,
...dimensions,
}),
),