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

Carousel doesn't loop wrap issue #39

Open
hachrock opened this issue Oct 28, 2014 · 4 comments
Open

Carousel doesn't loop wrap issue #39

hachrock opened this issue Oct 28, 2014 · 4 comments

Comments

@hachrock
Copy link

Hello, I tried the library and just discover the wrap property doesn't work, not even in the example here: http://www.andreasklein.org/articles/bootstrap-touch
When goes in mobile version the carousel stops in the last slider.
I think is related with: transform: translate3d(X%, 0px, 0px)
Any idea?
Thx,

@hachrock
Copy link
Author

Founded..!!

In bootstrap-touch-carousel.js
change:
f.prototype._showPane = function(a) {
this.$items.eq(this.current_pane).toggleClass("active"), a >= this.pane_count && this.pause(), a = Math.max(0, Math.min(a, this.pane_count - 1)), this.$items.eq(a).toggleClass("active"), this.current_pane = a;
var b = -(100 / this.pane_count * this.current_pane);
return this._setContainerOffset(b, !0, a), this
}

for:

f.prototype._showPane = function(a) {
if (a >= this.$items.length){ a = 0; }
this.$items.eq(this.current_pane).toggleClass("active"), a >= this.pane_count && this.pause(), a = Math.max(0, Math.min(a, this.pane_count - 1)), this.$items.eq(a).toggleClass("active"), this.current_pane = a;
var b = -(100 / this.pane_count * this.current_pane);
return this._setContainerOffset(b, !0, a), this
}

@ixisio
Copy link
Owner

ixisio commented Nov 18, 2014

hey @hachrock,

Yes, cycling is still an open issue: #28.
Could you please submit a pull request with your code changes!?

Cheers

@AKrishma
Copy link

This code works, but it shows slides movements when user moves from last to first and first to last slide . Proper circular transition is not there. Any update on that ?

@ixisio
Copy link
Owner

ixisio commented Aug 14, 2015

@hachrock Please submit a Pull Request..!

\cc @AKrishma

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

3 participants