Open altschuler opened 7 years ago
You can do the following: HTML: <img-cropper [image]="data" [settings]="cropperSettings" (onCrop)="cropped($event)">
TS: cropped(bounds:Bounds) { console.log(bounds); }
and you will get the correct bounds on cropped event
If the behavior is as expected please close the issue.
Using
getCropBounds()
I can get the cropped bounds of the canvas, and using a hacky way of getting the clamp properties I can get the bounds of the crop, but they seem to be wrongly scaled.What I'm after is a way of getting the crop box of the original image so the actual cropping can be done elsewhere.
My own hacky solution is to copy most of the code from
getCroppedImage
inimageCropper.ts
and use the values passed todrawImageIOSFix
.