lukaszflorczak / vue-agile

🎠 A carousel component for Vue.js
https://lukaszflorczak.github.io/vue-agile/
MIT License
1.49k stars 167 forks source link

Reset timer after usage goTo method #110

Closed thebspin closed 4 years ago

thebspin commented 5 years ago

Hi i am using the goTo() method to go to a certain slide clicking a icon. If i have a transition time of 3500 and i click on a icon after 3000 ms, the slider auto rotates to the next one again just after 500 ms where i expect it to wait another 3500 after i use the method.

eduardocmoreno commented 5 years ago

Same here... So I looked inside the Agile.vue code in node modules and I found this method "restartAutoPlay" and it works nice. Just use like this:

<button @click="$refs.carousel.next(); $refs.carousel.restartAutoPlay()">next</button>
thebspin commented 5 years ago

Same here... So I looked inside the Agile.vue code in node modules and I found this method "restartAutoPlay" and it works nice. Just use like this:

<button @click="$refs.carousel.next(); $refs.carousel.restartAutoPlay()">next</button>

That is a really nice find! This helps me allot, i found a small issue in my use case but i managed to work around it thanks!