mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): make compare image scale with first image when using contain fit
This commit is contained in:
parent
745140fa6b
commit
0f0a6852f1
@ -168,8 +168,8 @@ export const ImageComparisonSlider = memo(({ firstImage, secondImage }: Props) =
|
|||||||
<Image
|
<Image
|
||||||
src={secondImage.image_url}
|
src={secondImage.image_url}
|
||||||
fallbackSrc={secondImage.thumbnail_url}
|
fallbackSrc={secondImage.thumbnail_url}
|
||||||
w={sliderFit === 'fill' ? fittedSize.width : secondImage.width}
|
w={sliderFit === 'fill' ? fittedSize.width : (fittedSize.width * secondImage.width) / firstImage.width}
|
||||||
h={sliderFit === 'fill' ? fittedSize.height : secondImage.height}
|
h={sliderFit === 'fill' ? fittedSize.height : (fittedSize.height * secondImage.height) / firstImage.height}
|
||||||
maxW={fittedSize.width}
|
maxW={fittedSize.width}
|
||||||
maxH={fittedSize.height}
|
maxH={fittedSize.height}
|
||||||
objectFit={sliderFit}
|
objectFit={sliderFit}
|
||||||
|
Loading…
Reference in New Issue
Block a user