mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): fix image fit
- Prevent init, current & control images from overflowing
This commit is contained in:
parent
b1000e30c1
commit
099e1e7c08
@ -60,7 +60,10 @@ const ControlNetImagePreview = (props: Props) => {
|
|||||||
processorType !== 'none';
|
processorType !== 'none';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box ref={containerRef} sx={{ position: 'relative', w: 'full', h: 'full' }}>
|
<Box
|
||||||
|
ref={containerRef}
|
||||||
|
sx={{ position: 'relative', w: 'full', h: 'full', aspectRatio: '1/1' }}
|
||||||
|
>
|
||||||
<IAIDndImage
|
<IAIDndImage
|
||||||
image={controlImage}
|
image={controlImage}
|
||||||
onDrop={handleDrop}
|
onDrop={handleDrop}
|
||||||
|
@ -51,6 +51,7 @@ const CurrentImageDisplay = () => {
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
gap: 4,
|
gap: 4,
|
||||||
|
position: 'absolute',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<CurrentImagePreview />
|
<CurrentImagePreview />
|
||||||
|
@ -72,9 +72,10 @@ const InitialImagePreview = () => {
|
|||||||
sx={{
|
sx={{
|
||||||
width: 'full',
|
width: 'full',
|
||||||
height: 'full',
|
height: 'full',
|
||||||
position: 'relative',
|
position: 'absolute',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
|
p: 4,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<IAIDndImage
|
<IAIDndImage
|
||||||
|
Loading…
Reference in New Issue
Block a user