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

ERROR TypeError: Cannot read property 'scale' of undefined #68

Open
jinghun1999 opened this issue Apr 20, 2022 · 1 comment
Open

ERROR TypeError: Cannot read property 'scale' of undefined #68

jinghun1999 opened this issue Apr 20, 2022 · 1 comment

Comments

@jinghun1999
Copy link

I used this component in ionic3.
Another colleague's computer packed apk, no problem. The apk packaged on both of my computers is running with errors。
html file:

<angular-cropper [cropperOptions]="config"
                     (touchstart)="cropperTouchStart($event)"
                     [imageUrl]="imageUrl" #angularCropper></angular-cropper>

and typescript file:

...
@ViewChild('angularCropper') public angularCropper: AngularCropperjsComponent;
...
setTimeout(() => {
    console.log('this.angularCropper', this.angularCropper)
    this.angularCropper.cropper.scale(0.1, 0.1);
}, 500);

then show the error with "Cannot read property 'scale' of undefined"

@jinghun1999
Copy link
Author

my version is v0.1.5 and the cropperjs version is 1.5.2
I can't find any reason for this error as my colleague works well.

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

1 participant