rcrop
rcrop copied to clipboard
How to set the minSize after image onload event.
Hi,
I tried the below code on which I applied the crop on the image Onload event. it set the minSize properly but after that resizing image is not working like reducing the size from the front end is not working.
var img = new Image()
img.src = 'images/demo.jpg';
img.onload = function () {
let size = 0;
if (this.width <= this.height) {
size = this.width;
}
else {
size = this.height;
}
debugger;
$('#image-4').rcrop({
minSize: [size, size],
preserveAspectRatio: true,
});
};
minSize set properly what I wanted but when I try to reduce the cropbox while drag its not working
@aewebsolutions please help me here.