Open oneezy opened 8 years ago
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 https://github.com/n1ywb/iron-swipeable-pages/commit/cef18dad5c5ed91340edca0d905659cdf2a2f049
yeah, ideally we could expose the functionality through the API. Something like this,
<iron-swipeable-pages
timer="3s"
loop="true"
</iron-swipeable-pages>
FEATURE REQUEST: Add automatic swipes (carousel) ?