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

Add an option to auto-slide right only #1437

Merged
merged 3 commits into from
Nov 19, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ Reveal.initialize({
// Stop auto-sliding after user input
autoSlideStoppable: true,

// Use this method for navigation when auto-sliding
autoSlideMethod: Reveal.navigateNext,

// Enable slide navigation via mouse wheel
mouseWheel: false,

Expand Down Expand Up @@ -297,6 +300,8 @@ You can also override the slide duration for individual slides and fragments by
</section>
```

To override the method used for navigation when auto-sliding, you can specify the ```autoSlideMethod``` setting. To only navigate along the top layer and ignore vertical slides, set this to ```Reveal.navigateRight```.

Whenever the auto-slide mode is resumed or paused the ```autoslideresumed``` and ```autoslidepaused``` events are fired.


Expand Down
9 changes: 4 additions & 5 deletions js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -3688,7 +3688,10 @@
// - The overview isn't active
// - The presentation isn't over
if( autoSlide && !autoSlidePaused && !isPaused() && !isOverview() && ( !Reveal.isLastSlide() || availableFragments().next || config.loop === true ) ) {
autoSlideTimeout = setTimeout( navigateNext, autoSlide );
autoSlideTimeout = setTimeout( function() {
typeof config.autoSlideMethod === 'function' ? config.autoSlideMethod() : navigateNext();
cueAutoSlide();
}, autoSlide );
autoSlideStartTime = Date.now();
}

Expand Down Expand Up @@ -3834,10 +3837,6 @@
}
}

// If auto-sliding is enabled we need to cue up
// another timeout
cueAutoSlide();

}

/**
Expand Down