FEATURE REQUEST: Add automatic swipes (carousel) ?
Opened this issue · 2 comments
oneezy commented
FEATURE REQUEST: Add automatic swipes (carousel) ?
n1ywb commented
do you mean have a timer that fires swipes periodically? the element already inherits selectNext() and selectPrevious() from IronSelectableBehavior so you can just call those from a timer function. One caveat is it will animate the wrap-around transition the wrong way, it will animate all the pages sliding back to the first page like a stack instead of sliding directly to the first page like a proper carousel. I hacked in a kludge to make it animate properly on a 3 element list but you'll need to improve it to make it work with more than 3 elements n1ywb@cef18da
oneezy commented
yeah, ideally we could expose the functionality through the API. Something like this,
<iron-swipeable-pages
timer="3s"
loop="true"
</iron-swipeable-pages>