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

change croppersettings dynamically

Open kudsyf opened this issue 8 years ago • 3 comments
trafficstars

i need to change the predefined cropper settings based on a condition, i tried the following

this.cropper.cropper = new ImageCropper(this.cropperImageSettings);
this.cropperImage.cropper.prepare(this.canvas);

but am getting blank canvas ! any idea ?

kudsyf avatar Jun 30 '17 16:06 kudsyf

i would also like to change the cropperSettings dynamically...

diannall avatar Sep 26 '17 23:09 diannall

Please try this,

this.cropper.cropper = new ImageCropper(this.cropperImageSettings); this.cropper.cropper.prepare(this.cropper.cropcanvas.nativeElement); this.cropper.setImage(image);

its working for me.

ayya1987 avatar Nov 16 '17 08:11 ayya1987

@ayya1987 - That fixed it for me, thanks!

It would be nice to be able to toggle some settings without the need to reset the image (causes a flicker and resets the cropper area). But this work around will do for now.

Thanks again!

MNorgren avatar Feb 07 '18 15:02 MNorgren