From 5bf144e6bc9b771947576fea1b524160ffc999e3 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Tue, 11 Jul 2023 18:22:50 +1200 Subject: [PATCH] feat(node-editor): fit view on init --- invokeai/frontend/web/src/features/nodes/components/Flow.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/invokeai/frontend/web/src/features/nodes/components/Flow.tsx b/invokeai/frontend/web/src/features/nodes/components/Flow.tsx index c31fc4e9b7..7b0718182b 100644 --- a/invokeai/frontend/web/src/features/nodes/components/Flow.tsx +++ b/invokeai/frontend/web/src/features/nodes/components/Flow.tsx @@ -72,6 +72,7 @@ export const Flow = () => { const onInit: OnInit = useCallback( (v) => { dispatch(setEditorInstance(v)); + if (v) v.fitView(); }, [dispatch] );