Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timer not reset when user changes slides manually #32

Open
nickdaugherty opened this issue Mar 22, 2012 · 4 comments
Open

Timer not reset when user changes slides manually #32

nickdaugherty opened this issue Mar 22, 2012 · 4 comments

Comments

@nickdaugherty
Copy link

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)

@joelambert
Copy link
Owner

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

@NiclasLindqvist
Copy link

Hi, I've encountered the same issue. Is there a known workaround?

@AnonSphere
Copy link

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();
    },  

@wing5wong
Copy link

thansk for the fix, it works.
would be nice to see this sorted in production code, have you submitted a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants