tidy(ui): use helper to sync scaled bbox size on model change

This commit is contained in:
psychedelicious 2024-08-28 07:11:05 +10:00
parent beb4e823dc
commit 6d209c6cc3

View File

@ -1045,10 +1045,7 @@ export const canvasSlice = createSlice({
const bboxDims = calculateNewSize(state.bbox.aspectRatio.value, optimalDimension * optimalDimension);
state.bbox.rect.width = bboxDims.width;
state.bbox.rect.height = bboxDims.height;
if (state.bbox.scaleMethod === 'auto') {
state.bbox.scaledSize = getScaledBoundingBoxDimensions(bboxDims, optimalDimension);
}
syncScaledSize(state);
}
});
},