mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): fix badges for image settings canvas
This commit is contained in:
parent
cecee33bc0
commit
271456b745
@ -24,13 +24,34 @@ import { ImageSizeLinear } from './ImageSizeLinear';
|
||||
|
||||
const selector = createMemoizedSelector(
|
||||
[stateSelector, activeTabNameSelector],
|
||||
({ generation, hrf }, activeTabName) => {
|
||||
const { aspectRatio, width, height, shouldRandomizeSeed } = generation;
|
||||
({ generation, canvas, hrf }, activeTabName) => {
|
||||
const { shouldRandomizeSeed } = generation;
|
||||
const { hrfEnabled } = hrf;
|
||||
const badges = [`${width}×${height}`, aspectRatio.id];
|
||||
const badges: string[] = [];
|
||||
|
||||
if (activeTabName === 'unifiedCanvas') {
|
||||
const {
|
||||
aspectRatio,
|
||||
boundingBoxDimensions: { width, height },
|
||||
} = canvas;
|
||||
badges.push(`${width}×${height}`);
|
||||
badges.push(aspectRatio.id);
|
||||
if (aspectRatio.isLocked) {
|
||||
badges.push('locked');
|
||||
}
|
||||
} else {
|
||||
const { aspectRatio, width, height } = generation;
|
||||
badges.push(`${width}×${height}`);
|
||||
badges.push(aspectRatio.id);
|
||||
if (aspectRatio.isLocked) {
|
||||
badges.push('locked');
|
||||
}
|
||||
}
|
||||
|
||||
if (!shouldRandomizeSeed) {
|
||||
badges.push('Manual Seed');
|
||||
}
|
||||
|
||||
if (hrfEnabled) {
|
||||
badges.push('HiRes Fix');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user