mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
feat(ui): inpaint mask settings layout
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import { useAppSelector } from 'app/store/storeHooks';
|
||||
import { CanvasEntitySettingsWrapper } from 'features/controlLayers/components/common/CanvasEntitySettingsWrapper';
|
||||
import { InpaintMaskAddButtons } from 'features/controlLayers/components/InpaintMask/InpaintMaskAddButtons';
|
||||
import { InpaintMaskDenoiseLimitSlider } from 'features/controlLayers/components/InpaintMask/InpaintMaskDenoiseLimitSlider';
|
||||
import { InpaintMaskNoiseSlider } from 'features/controlLayers/components/InpaintMask/InpaintMaskNoiseSlider';
|
||||
import { useEntityIdentifierContext } from 'features/controlLayers/contexts/EntityIdentifierContext';
|
||||
@@ -30,12 +29,15 @@ export const InpaintMaskSettings = memo(() => {
|
||||
const hasNoiseLevel = useAppSelector(selectHasNoiseLevel);
|
||||
|
||||
if (!hasNoiseLevel && !hasDenoiseLimit) {
|
||||
// If we show the <InpaintMaskAddButtons /> below, we can remove this check.
|
||||
// Until then, if there are no sliders to show for the mask settings, return null. This prevents rendering an
|
||||
// empty settings wrapper div, which adds unnecessary space in the UI.
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<CanvasEntitySettingsWrapper>
|
||||
{!hasNoiseLevel && !hasDenoiseLimit && <InpaintMaskAddButtons />}
|
||||
{/* {!hasNoiseLevel && !hasDenoiseLimit && <InpaintMaskAddButtons />} */}
|
||||
{hasNoiseLevel && <InpaintMaskNoiseSlider />}
|
||||
{hasDenoiseLimit && <InpaintMaskDenoiseLimitSlider />}
|
||||
</CanvasEntitySettingsWrapper>
|
||||
|
||||
Reference in New Issue
Block a user