Fix calculation
This commit is contained in:
@@ -349,9 +349,8 @@ function interpolateTransform(
|
|||||||
let initialScale = thumbnailDims.width / screenSize.width
|
let initialScale = thumbnailDims.width / screenSize.width
|
||||||
|
|
||||||
const imageAspect = imageDims.width / imageDims.height
|
const imageAspect = imageDims.width / imageDims.height
|
||||||
const finalWidth = screenSize.width
|
const thumbAspect = thumbnailDims.width / thumbnailDims.height
|
||||||
const finalHeight = finalWidth / imageAspect
|
if (imageAspect > 1 && thumbAspect < 1) {
|
||||||
if (initialScale * finalHeight < thumbnailDims.height) {
|
|
||||||
initialScale = initialScale * imageAspect
|
initialScale = initialScale * imageAspect
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user