fix: wrong scale calculation

This commit is contained in:
Mary
2024-05-08 12:00:53 +07:00
parent 36729153cc
commit 9a260c944b
+1 -1
View File
@@ -286,7 +286,7 @@ function containImageRes(
let scale = 1
if (w > maxW || h > maxH) {
scale = w < h ? maxW / w : maxH / h
scale = w > h ? maxW / w : maxH / h
w = Math.floor(w * scale)
h = Math.floor(h * scale)
}