Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'checkCrossOrigin' of undefined #35

Open
alexdabast opened this issue Jan 1, 2019 · 4 comments
Open

Cannot read property 'checkCrossOrigin' of undefined #35

alexdabast opened this issue Jan 1, 2019 · 4 comments

Comments

@alexdabast
Copy link

alexdabast commented Jan 1, 2019

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

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

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

@FrancescoPaiola
Copy link

i have the same problem

@chr1soscl
Copy link

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

@andersonmelo
Copy link

andersonmelo commented Sep 11, 2019

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) => {}
};

}`

@chr1soscl
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants