Disabled bounding box settings when locked

This commit is contained in:
psychedelicious 2022-11-01 16:51:03 +11:00 committed by Lincoln Stein
parent 21483f5d07
commit eb9028ab30

View File

@ -145,14 +145,16 @@ const BoundingBoxSettings = () => {
width={'5rem'} width={'5rem'}
/> />
<IAIIconButton <IAIIconButton
isDisabled={shouldLockBoundingBox}
size={'sm'} size={'sm'}
aria-label={'Reset Width'} aria-label={'Reset Width'}
tooltip={'Reset Width'} tooltip={'Reset Width'}
onClick={handleResetWidth} onClick={handleResetWidth}
icon={<BiReset />} icon={<BiReset />}
styleClass="inpainting-bounding-box-reset-icon-btn" styleClass="inpainting-bounding-box-reset-icon-btn"
isDisabled={canvasDimensions.width === boundingBoxDimensions.width} isDisabled={
shouldLockBoundingBox ||
canvasDimensions.width === boundingBoxDimensions.width
}
/> />
</div> </div>
<div className="inpainting-bounding-box-dimensions-slider-numberinput"> <div className="inpainting-bounding-box-dimensions-slider-numberinput">
@ -177,7 +179,6 @@ const BoundingBoxSettings = () => {
width={'5rem'} width={'5rem'}
/> />
<IAIIconButton <IAIIconButton
isDisabled={shouldLockBoundingBox}
size={'sm'} size={'sm'}
aria-label={'Reset Height'} aria-label={'Reset Height'}
tooltip={'Reset Height'} tooltip={'Reset Height'}
@ -185,6 +186,7 @@ const BoundingBoxSettings = () => {
icon={<BiReset />} icon={<BiReset />}
styleClass="inpainting-bounding-box-reset-icon-btn" styleClass="inpainting-bounding-box-reset-icon-btn"
isDisabled={ isDisabled={
shouldLockBoundingBox ||
canvasDimensions.height === boundingBoxDimensions.height canvasDimensions.height === boundingBoxDimensions.height
} }
/> />