Infinite:false doesn't work correctly on swipe #450

Open
shershen08 opened this Issue Sep 21, 2016 · 0 comments

Projects

None yet

1 participant

@shershen08
  1. Haven't found any info on infinite:false config option in the documentation. Only in the code itself. Could be possible handy to add in in the docs.
  2. Even after enabling infinite:false i still can scroll the first and Last slides to next one with swipe. I've created a small demo here with fixed problem: http://codepen.io/shershen08/pen/mAOjGb .The key addition is in next and prev methods
    If you comment out those pieces you can see the faulty behaviour.
e.next = function() {
            var t = e.current + 1;
     //here, just go animate back
            if (t == e.total) {
                e.$container.animate({ left: -(100 * e.current) + "%" }, e.options.speed / 2);
                return;
            }
            return t >= e.total && (t = 0), e.animate(t, "next")
        }, e.prev = function() {
     //here, just go animate back
            if (e.current == 0) {
                e.$container.animate({ left: -(100 * e.current) + "%" }, e.options.speed / 2);
                return;
            }
            return e.animate(e.current - 1, "prev")
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment