ZouYouShun / ngx-hm-carousel

a light carousel for Angular18+, support mobile touch by hammerJs
https://stackblitz.com/edit/stackblitz-starters-nkd5pk?file=src%2Fmain.ts
MIT License
60 stars 10 forks source link

Moving more than 1 slide at a time #22

Open dalvarezr opened 5 years ago

dalvarezr commented 5 years ago

I'd like to know if is posible (and how) to move more than one slide at a time. From what I understood from the docs that's what scroll-num is for, but I couldn't make it work.

Since I'm using the carousel with breakpoints, I'd like to know if is it posible to move as many slides as the current break point is showing: example:

breakpoint: NgxHmCarouselBreakPointUp[] = [ // move one slide { width: 360, number: 1 }, // move two slides { width: 500, number: 2 }, // move three slides { width: 768, number: 3 }, ];

I'm using only the previous and next arrows to move between slides. Not using the dots.

ZouYouShun commented 5 years ago

Hi, @dalvarezr I can understand what you want.

In the current version, we can't get the breakpoint occur event.

I thinks I will add scrollNum in the NgxHmCarouselBreakPointUp and make that can change scroll-number dynamically.