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

Fix bullet and click event problem when slideCount <= slidesToShow #2822

Merged
merged 5 commits into from
Jun 2, 2017

Conversation

flaviocysne
Copy link
Contributor

@flaviocysne flaviocysne commented Mar 29, 2017

Fix for the Issue #2821
This PR enable click events if number of slides is less than slidesToShow.
One bullet is shown when slideCount is lesser or equal than slidesToShow, also enabling currentSlide to be reset after changing its value.

@flaviocysne flaviocysne changed the title Solving Issue #2821 Fix bullet and click event problem when slideCount <= slidesToShow Mar 30, 2017
@flaviocysne
Copy link
Contributor Author

@kenwheeler any suggestion or comment? I really need this fix. At the moment I'm using my fork, but I still hope using yours.

@pnewman8
Copy link

I also need this fix. In the short term I plan to use this fork. Thanks to flaviocysne.

My problem was that a call to slickGoTo was ignored (in slideHandler), because slideCount <= slidesToShow.

@pnewman8
Copy link

On my call to slickGoTo, I had to pass the "dontAnimate" argument as true. Without that, only the selected slide was visible, at the left (it's actually the last of 3, with slidesToShow = 3). Haven't figured out why yet.

@leggomuhgreggo
Copy link
Collaborator

Thanks for the PR. I definitely'd like to review this and get it merged. Would speed things along if someone could get the ball rolling on some testing. Here's a codepen with a bunch of different cases to make sure aren't being broken by the change -- just replace the slick.js with your fork ala rawgit or something.

@nsarradin
Copy link

Thanks for the PR ! I have tested it on my project and it solves the slickGoTo method bug. Just a suggestion of improvement if I may, the infinite option doesn't seem to work when the number of slides <= slideToShow. It could be great to correct this :)

@flaviocysne
Copy link
Contributor Author

@pnewman8 could you publish a Code Pen sample or a Flickr sample that I can use to test against?

@leggomuhgreggo forked your pen and changed slideToShow values to the same number of slides per example. Let me know of any unexpected behavior, please. https://codepen.io/flaviocysne/pen/BRWmBK

@nsarradin what is the expected behavior when infinte is true and numer of slides <= slidesToShow? I didn't change it because I thought that arrows are used to change carrousel pages, not to change slides.

@flaviocysne
Copy link
Contributor Author

@kenwheeler is there anything still needed to accept this 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

Successfully merging this pull request may close these issues.

4 participants