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

carousel warnings about hammer.js #2468

Closed
CarinaCLH opened this issue Nov 16, 2018 · 4 comments · Fixed by #3062
Closed

carousel warnings about hammer.js #2468

CarinaCLH opened this issue Nov 16, 2018 · 4 comments · Fixed by #3062

Comments

@CarinaCLH
Copy link

Version

1.8.0

Environment

windows10, angular 6.2.4

Reproduction link

https://ng-zorro-antd-start-lc5lqb.stackblitz.io/

Steps to reproduce

  1. copy the code about carousel to my website;
  2. get warings, like " The 'pan' event cannot be bound because Hammer.JS is not loaded and no custom loader has been specified."
  3. I just set [nzEnableSwipe]="false";
  4. I still get warnings
    image
  5. I think for pc users, we don't need to import Hammer.JS to support gesture, so how can i get out of those warnings?

What is expected?

without any warnings about Hammer.JS

What is actually happening?

have warnings

Other?

@wzhudev wzhudev self-assigned this Nov 18, 2018
@wzhudev
Copy link
Member

wzhudev commented Nov 18, 2018

Because of this line:

(swipeleft)="swipe('swipeleft')" (swiperight)="swipe('swiperight')" (pan)="swipeInProgress($event);">

Supporting hammer.js is a built-in feature of Angular. I will try to silent it.

@CarinaCLH
Copy link
Author

Thank you for your reply and your great job.

@vahidvdn
Copy link

vahidvdn commented Apr 4, 2019

I have the same issue and swipe is not working in the carousel. Should I install hammerjs (at least before the fix)?
Why it's not a part of the project's dependencies?

@wzhudev
Copy link
Member

wzhudev commented Apr 5, 2019

@vahidvdn Recently, we refactored the component and hammer.js will be required no longer soon.

vthinkxie pushed a commit that referenced this issue Apr 18, 2019
* refactor(module:carousel): refactor

* fix: move some listeners to body

* fix: fix vertical context preparing dragging from first to last

* fix: opacity strategy transition

* fix(module:breadcrumb): add input boolean

* feat: support SSR

* fix: lint

* fix: fix active index not reset when content changes
close #2468, close #2218
andrew-yangy pushed a commit to andrew-yangy/ng-zorro-antd that referenced this issue Jun 20, 2019
* refactor(module:carousel): refactor

* fix: move some listeners to body

* fix: fix vertical context preparing dragging from first to last

* fix: opacity strategy transition

* fix(module:breadcrumb): add input boolean

* feat: support SSR

* fix: lint

* fix: fix active index not reset when content changes
close NG-ZORRO#2468, close NG-ZORRO#2218
Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this issue Apr 9, 2020
* refactor(module:carousel): refactor

* fix: move some listeners to body

* fix: fix vertical context preparing dragging from first to last

* fix: opacity strategy transition

* fix(module:breadcrumb): add input boolean

* feat: support SSR

* fix: lint

* fix: fix active index not reset when content changes
close NG-ZORRO#2468, close NG-ZORRO#2218
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
* refactor(module:carousel): refactor

* fix: move some listeners to body

* fix: fix vertical context preparing dragging from first to last

* fix: opacity strategy transition

* fix(module:breadcrumb): add input boolean

* feat: support SSR

* fix: lint

* fix: fix active index not reset when content changes
close NG-ZORRO#2468, close NG-ZORRO#2218
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants