From d6d27a82a662fffcebce48056deb3dff4727edbd Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sat, 7 Sep 2024 07:27:47 +1000 Subject: [PATCH] fix(ui): aspect ratio preview not updating when changing bbox on canvas --- .../web/src/features/controlLayers/store/canvasSlice.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/invokeai/frontend/web/src/features/controlLayers/store/canvasSlice.ts b/invokeai/frontend/web/src/features/controlLayers/store/canvasSlice.ts index 06f25878dc..2c8a8542c5 100644 --- a/invokeai/frontend/web/src/features/controlLayers/store/canvasSlice.ts +++ b/invokeai/frontend/web/src/features/controlLayers/store/canvasSlice.ts @@ -687,6 +687,13 @@ export const canvasSlice = createSlice({ }, bboxChanged: (state, action: PayloadAction) => { state.bbox.rect = action.payload; + + if (!state.bbox.aspectRatio.isLocked) { + state.bbox.aspectRatio.value = state.bbox.rect.width / state.bbox.rect.height; + state.bbox.aspectRatio.id = 'Free'; + state.bbox.aspectRatio.isLocked = false; + } + syncScaledSize(state); }, bboxWidthChanged: (