fix(ui): aspect ratio preview not updating when changing bbox on canvas

This commit is contained in:
psychedelicious
2024-09-07 07:27:47 +10:00
parent ff0d2fcc92
commit d6d27a82a6

View File

@@ -687,6 +687,13 @@ export const canvasSlice = createSlice({
},
bboxChanged: (state, action: PayloadAction<IRect>) => {
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: (