rcrop icon indicating copy to clipboard operation
rcrop copied to clipboard

How to set the minSize after image onload event.

Open MrShaikh01 opened this issue 3 years ago • 1 comments

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,
            });

        };

Untitled

minSize set properly what I wanted but when I try to reduce the cropbox while drag its not working

MrShaikh01 avatar Apr 11 '21 05:04 MrShaikh01

@aewebsolutions please help me here.

MrShaikh01 avatar Apr 11 '21 05:04 MrShaikh01