rcrop icon indicating copy to clipboard operation
rcrop copied to clipboard

Mantain aspect only functions on first image

Open IDEDOnline opened this issue 7 years ago • 1 comments

This appeared for me after loading 2-3 images in a row. Init the cropper tool on the first image using (image is not a 1:1 square but close) $('#cropArea').rcrop({minSize: [100, 100], preserveAspectRatio: true, grid: true}); now load another picture into memory (16:9) then another (16:9), now check the crop area and you will find its no longer a 1:1 aspect ratio. It did seem to retain the 1:1 for the first and second image for me but upon loading the third in the aspect seems to have reset itself and now maintains the aspect of the image and not the one set in code.

IDEDOnline avatar Nov 06 '17 14:11 IDEDOnline

A note on this issue, I am dynamically pushing the image selected by the user into a img container with no defined size (height and width of 100%) which is held within a div which has 100% width.

IDEDOnline avatar Nov 06 '17 15:11 IDEDOnline