During resizing, make the smaller dimension decide the new dimensions
This commit is contained in:
parent
f9000de16c
commit
64a68743bd
@ -122,7 +122,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
const widthIncrease = dragWidth / naturalWidth!;
|
||||
const heightIncrease = dragHeight / naturalHeight!;
|
||||
|
||||
if (widthIncrease > heightIncrease) {
|
||||
if (widthIncrease < heightIncrease) {
|
||||
width = Math.trunc(dragWidth);
|
||||
height = Math.trunc(naturalHeight! * widthIncrease);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user