angular2-img-cropper icon indicating copy to clipboard operation
angular2-img-cropper copied to clipboard

not updating croppedWidth and croppedHeight

Open johnpaulmanoza opened this issue 8 years ago • 1 comments

Hi, im trying to update the image croppedWidth and croppedHeight in cropped(bounds: Bounds) method but it is not working when exporting the result image. I can verify that the values printed is correct but those sizes are not working when exporting the result image. Please help. Thanks

cropped(bounds: Bounds) {
    this.cropper.settings.croppedWidth = bounds.right - bounds.left;
    this.cropper.settings.croppedHeight = bounds.bottom - bounds.top;
   console.log("changed sizes ", this.cropper.settings.croppedWidth, this.cropper.settings.croppedHeight);
}

johnpaulmanoza avatar Sep 15 '17 17:09 johnpaulmanoza

It looks like you want to archive can be done by activating the setting "preserveSize" this.cropper.settings.preserveSize=true;

torsten-simon avatar Sep 28 '17 12:09 torsten-simon