refactor: simplify judgment conditions

This commit is contained in:
HD
2022-06-28 10:17:45 +08:00
parent d01cb5b2a8
commit ab5f9e6c07
+1 -1
View File
@@ -36,7 +36,7 @@ export function getDefaultSize(size = null, min = 480) {
const tmp = min > oWidth ? oWidth : min;
return { width: tmp, height: tmp };
}
const isVertical = oWidth > oHeight ? false : true;
const isVertical = oWidth <= oHeight;
let dWidth = 0;
let dHeight = 0;
if (isVertical) {