gbrlsnchs / material2-carousel

A carousel component for Angular using Material
https://gsr.dev/material2-carousel
MIT License
85 stars 114 forks source link

fixed vertical scrolling on mobile issue with 3 steps. #22

Closed chriswnewman closed 4 years ago

chriswnewman commented 4 years ago

This PR fixes vertical scrolling issues on mobile.

1) Added a DI provider with an instance of HammerGestureConfig per https://github.com/angular/angular/issues/10541#issuecomment-300761387

2) App Modules need to import CarouselModule using static forRoot() method. This may be considered a "breaking change"

3) Ignore vertical pans in the onPan function, where y velocity is greater than x velocity.