angular-cropperjs icon indicating copy to clipboard operation
angular-cropperjs copied to clipboard

Cannot read property 'checkCrossOrigin' of undefined

Open alexdabast opened this issue 7 years ago • 4 comments

https://github.com/matheusdavidson/angular-cropperjs/blob/96fbcb9042b7dd4c2579c8f7b970315f7f0e12f6/projects/angular-cropperjs/src/lib/cropper/cropper.component.ts#L63

checkCrossOrigin should be optional https://github.com/fengyuanchen/cropperjs#checkcrossorigin

if (this.cropperOptions && this.cropperOptions.checkCrossOrigin) image.crossOrigin = 'anonymous';

alexdabast avatar Jan 01 '19 20:01 alexdabast

i have the same problem

FrancescoPaiola avatar Apr 04 '19 15:04 FrancescoPaiola

I have the same issue, but I am not providing any cropperOptions, I am still looking for the config information or some example.

chr1soscl avatar Sep 09 '19 20:09 chr1soscl

I had the same problem, I added the cropperOptions in ngOnInit() the my component.

`ngOnInit() { this.defaultValues();

this.cropperOptions = {
  center: true,
  guides: true,
  viewMode: 1,
  aspectRatio: 3.1,
  scalable: true,
  zoomable: true,
  autoCrop: true,
  zoom: (e) => {},
  crop: (e) => {},
  cropstart: (e) => {},
  cropend: (e) => {},
  ready: (e) => {}
};

}`

andersonmelo avatar Sep 11 '19 11:09 andersonmelo

cropperOptions = { center: true, guides: true, viewMode: 1, aspectRatio: 3.1, scalable: true, zoomable: true, autoCrop: true, zoom: (e) => {}, crop: (e) => {}, cropstart: (e) => {}, cropend: (e) => {}, ready: (e) => {} };

Thank you very much, this resolved the issue.

chr1soscl avatar Sep 11 '19 13:09 chr1soscl