Skip to content

Commit 0cd4e2c

Browse files
committed
Merge branch 'dev' of github.com:hakimel/reveal.js into dev
2 parents bef2722 + bbe38ad commit 0cd4e2c

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ Reveal.initialize({
152152
// Stop auto-sliding after user input
153153
autoSlideStoppable: true,
154154

155+
// Use this method for navigation when auto-sliding
156+
autoSlideMethod: Reveal.navigateNext,
157+
155158
// Enable slide navigation via mouse wheel
156159
mouseWheel: false,
157160

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

303+
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```.
304+
300305
Whenever the auto-slide mode is resumed or paused the ```autoslideresumed``` and ```autoslidepaused``` events are fired.
301306

302307

js/reveal.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3688,7 +3688,10 @@
36883688
// - The overview isn't active
36893689
// - The presentation isn't over
36903690
if( autoSlide && !autoSlidePaused && !isPaused() && !isOverview() && ( !Reveal.isLastSlide() || availableFragments().next || config.loop === true ) ) {
3691-
autoSlideTimeout = setTimeout( navigateNext, autoSlide );
3691+
autoSlideTimeout = setTimeout( function() {
3692+
typeof config.autoSlideMethod === 'function' ? config.autoSlideMethod() : navigateNext();
3693+
cueAutoSlide();
3694+
}, autoSlide );
36923695
autoSlideStartTime = Date.now();
36933696
}
36943697

@@ -3834,10 +3837,6 @@
38343837
}
38353838
}
38363839

3837-
// If auto-sliding is enabled we need to cue up
3838-
// another timeout
3839-
cueAutoSlide();
3840-
38413840
}
38423841

38433842
/**

0 commit comments

Comments
 (0)