Skip to content

Commit 163f79e

Browse files
committed
fix: maxSize
1 parent 854d52e commit 163f79e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/web/src/components/modals/ImageCropper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function getCroppedImg(
8888

8989
if (!_isNil(ctx)) {
9090
// 计算最大尺寸
91-
const size = Math.min(crop.width, crop.height, maxSize);
91+
const size = Math.min(Math.max(crop.width, crop.height), maxSize);
9292

9393
// 计算缩放比例
9494
const scale = size / Math.max(crop.width, crop.height);

0 commit comments

Comments
 (0)