SSENSE / vue-carousel

A flexible, responsive, touch-friendly carousel for Vue.js
https://ssense.github.io/vue-carousel/
MIT License
1.72k stars 504 forks source link

Added custom navigation links #590

Open samaroo opened 2 years ago

samaroo commented 2 years ago

Description

I added two new props the the "Carousel" component: "endOfCarouselLink" and "beginningOfCarousel". The "endOfCarousel" prop takes a URL as an argument and redirects to that link when you try to scroll past the end of of the last slide in the carousel. Likewise, the "beginningOfCarousel" props takes a URL as an argument and redirects to that link when you try to navigate backwards when on the first slide. I modified the "advancePage" to handle the cases when you try to scroll past either end of the carousel and redirect to the appropriate link.

Motivation and Context

https://github.com/SSENSE/vue-carousel/issues/294

How Has This Been Tested?

This was tested by hand using vue-play to make sure the changes work and do not break the current functionality of the carousel.

Screenshots (if appropriate):

Types of changes

Checklist: