mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
tidy(ui): use helper to sync scaled bbox size on model change
This commit is contained in:
parent
beb4e823dc
commit
6d209c6cc3
@ -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);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user