cstefanache / angular2-img-cropper

Angular 2 Image Cropper
MIT License
364 stars 135 forks source link

How to start cropper inside canvas from top position not from center #270

Open ayya1987 opened 6 years ago

ayya1987 commented 6 years ago

I have a requirement like, cropper which is showing inside canvas should start from top position not center alignment. Please help to resolve this.

ayya1987 commented 6 years ago

I was tried this code inside "cropper" method, cropper.cropPosition=null; cropPosition = new CropPosition(); cropPosition.x = bounds.left; cropPosition.y = 1; cropPosition.w = bounds.right-bounds.left; cropPosition.h = bounds.bottom-bounds.top;

it is working fine for me.