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

Make random option more random #246

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jtwalters
Copy link
Contributor

The sort method doesn't do a good job of randomizing the order of the slides. With one iteration, elements only have a 50% chance of being swapped with their neighbor.

This code picks a child element at random and iterates until all slides have been appended to the parent container at random. I believe this is much more random than the current code you have.

@carloroosen
Copy link

In practice it means only the first 3 slides can be the first in the show.

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.

2 participants