Croppr.js
Croppr.js copied to clipboard
aspectRatio and minSize not working correctly
The combination of aspectRatio and minSize is buggy when the ratio is vertical.
cropper with aspectRatio: 1.3333333333333333 minSize: [ 300, 400, "px" ] startSize: [ 1200, 675, "px" ]
The minimum crop result should be 300 * 400 But the cropper "snaps" from 400 * 533 to 300 * 533
I fixed it.
The constrainToSize function in box.js has a bug on line 212.
minHeight = minHeight * ratio;
must be
minHeight = minWidth * ratio;