Flux-Slider
Flux-Slider copied to clipboard
Timer not reset when user changes slides manually
When using automatic transitions, the timer should be reset when the user changes slides on their own. Currently, the timer keeps going, leading to unexpected behavior if a user changes slides near the automatic transition time (ie, they choose the slide, and then very shortly after, it transitions again)
Thanks for the ticket.
The desired behaviour is how you describe it so there must have been a bug introduced which prevents the timer from being reset.
I'll take a look
Hi, I've encountered the same issue. Is there a known workaround?
Easiest solution:
showImage: function(index, trans, opts) {
var restart = false;
if(this.playing) {
restart = true;
this.stop();
}
this.setNextIndex(index);
// Temporarily stop the transition interval
//clearInterval(this.interval);
//this.interval = null;
this.setupImages();
this.transition(trans, opts);
if(restart == true) this.start();
},
thansk for the fix, it works. would be nice to see this sorted in production code, have you submitted a PR?