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

#carouselNext and #carouselPrev do not have proper boundary check if infinite is false #7

Closed pascalbayer closed 6 years ago

pascalbayer commented 6 years ago

Clicking on #carouselNext and #carouselPrev with infinite=false doesn't have a proper boundary check. You will end up sliding to negative or positive slides that do not exist instead of stopping at the lower/upper limits of the slideIndex.

ZouYouShun commented 6 years ago

Hi @pascalbayer , I has fix that problem in 1.2.7, thanks for you correct. npm i ngx-hm-carousel@1.2.7

You can test it in Drag One section.

pascalbayer commented 6 years ago

Thanks for the immediate fix, I can confirm it works. Great work btw. I haven't found any other carousel implementation that was so easy to use but still allows complex use cases!