-
Notifications
You must be signed in to change notification settings - Fork 208
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
HammerJs and Change Detection #616
Comments
This seems to be an issue in Angular itself: angular/angular#42569 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
I've seen this issue (and its corresponding commit) and tried to install the package, but I've noticed that the problem seemed to still be there. So I tried to reproduce it and found a possible issue with HammerJs.
If we use the package without hammerjs (we can tell it because in console there is the warn
[NgxImageCropper] Could not find HammerJs - Pinch Gesture won't work
) everything works fine (the cd is triggered only when moving the cropper area), but if we import HammerJs, the cd is triggered on every mouse move, even if there is no image selected.I've tried directly importing hammer with
import 'hammerjs'
and with theprovider
as suggested in the demo (I added a ts-ignore because the compiler complains thatCould not find a declaration file for module 'hammerjs'.
, I don't know if that can cause the issue...):ngx-image-cropper/projects/demo-app/src/app/app.module.ts
Lines 18 to 20 in 8962bea
You can see a reproduction here: https://stackblitz.com/edit/image-cropper-h1osyc?file=src%2Fapp.component.ts (just move the mouse in the stackblitz area, even before selecting any image and that should trigger the
DoCheck
hook).Am I missing something or importing hammerjs in the wrong way?
Thank you for your work!
The text was updated successfully, but these errors were encountered: