fix: custom node example not fitting view
* fit view can't work (for the onLoad event) for elements assigned after the host has mounted (onMounted hook) as we can't calculate a rect of elements that don't exist at flow creation * in this case just trigger fit view __after__ elements have been created/passed to the flow Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -222,7 +222,7 @@ export const getRectOfNodes = (nodes: Node[]): Rect => {
|
||||
...position,
|
||||
width,
|
||||
height,
|
||||
} as any),
|
||||
}),
|
||||
),
|
||||
{ x: Infinity, y: Infinity, x2: -Infinity, y2: -Infinity },
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user