I am making an image cropper, the cropper has to be of a fixed dimension, but those dimensions can be dynamically changed by the user.
Everytime the box updates, I run this code.
let dimensions = {
height: 300,
width: 431
}
function makeSize()
{
console.log(cropper + ' ' + dimensions.height + " " + dimensions.width); // [object Object] 300 431
cropper.setCropBoxData({
height: dimensions.height,
width: dimensions.width
});
}
I do this to make sure the dimensions remain the same. For some reason this doesn't work. However, if I change the setCropBoxData function to this
cropper.setCropBoxData({
height: 431,
width: 300
});
Everything works fine.
No errors in the console,nothing. I'm at a totall loss.