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

automatic hiding (non-populating) of arrow controls when there's not enough items #21

Closed
deb00t opened this issue Dec 7, 2012 · 1 comment

Comments

@deb00t
Copy link

deb00t commented Dec 7, 2012

Currently the slider is not considering situations, when there's not enough items to fill the viewport. Or, better said - the whole slider seems to break in such situations, positioning items in ridiculous offsets and showing the move controls although they shouldn't be visible at all.

You can test this on a horizontal slider, with, ie. max and min set to 4, item width set to viewport/4, and the slider having only 1 or 2 items.

@stevenwanderski
Copy link
Owner

The slider now ensures that correct minSlides / maxSlides settings are enforced. If the actual number of slides is less than the supplied minSlides setting, the minSlides value becomes the actual number of slides. The same holds true for the maxSlides setting.

See a working example here:

http://jsfiddle.net/wandoledzep/qqM5U/

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

2 participants