From b365e947e12e9b62daed817d65965422f7ba0d82 Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Sun, 12 Dec 2021 12:04:13 +0100 Subject: [PATCH] refactor(flow): use computedPosition when checking inner bounds Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com> --- src/utils/graph.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/graph.ts b/src/utils/graph.ts index 14ce06bc..4ab0d7a3 100644 --- a/src/utils/graph.ts +++ b/src/utils/graph.ts @@ -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, }), ),