mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
ui: actually resolve circulars + fix flip bounding boxes AR unset
This commit is contained in:
parent
55f19aff3a
commit
c6bab14043
@ -80,7 +80,16 @@ export default function ParamBoundingBoxSize() {
|
|||||||
size="sm"
|
size="sm"
|
||||||
icon={<MdOutlineSwapVert />}
|
icon={<MdOutlineSwapVert />}
|
||||||
fontSize={20}
|
fontSize={20}
|
||||||
onClick={() => dispatch(flipBoundingBoxAxes())}
|
onClick={() => {
|
||||||
|
dispatch(flipBoundingBoxAxes());
|
||||||
|
if (
|
||||||
|
![null, 2 / 3, 16 / 9, 1 / 1].includes(
|
||||||
|
boundingBoxDimensions.height / boundingBoxDimensions.width
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
dispatch(setAspectRatio(null));
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<IAIIconButton
|
<IAIIconButton
|
||||||
tooltip={t('ui.lockRatio')}
|
tooltip={t('ui.lockRatio')}
|
||||||
|
@ -5,7 +5,6 @@ import { configChanged } from 'features/system/store/configSlice';
|
|||||||
import { clamp } from 'lodash-es';
|
import { clamp } from 'lodash-es';
|
||||||
import { ImageDTO } from 'services/api/types';
|
import { ImageDTO } from 'services/api/types';
|
||||||
|
|
||||||
import { flipBoundingBoxAxes } from 'features/canvas/store/canvasSlice';
|
|
||||||
import { clipSkipMap } from '../types/constants';
|
import { clipSkipMap } from '../types/constants';
|
||||||
import {
|
import {
|
||||||
CfgScaleParam,
|
CfgScaleParam,
|
||||||
@ -312,9 +311,6 @@ export const generationSlice = createSlice({
|
|||||||
state.clipSkip = 0;
|
state.clipSkip = 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.addCase(flipBoundingBoxAxes, (state) => {
|
|
||||||
state.aspectRatio = null;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user