summaryrefslogtreecommitdiffhomepage
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js23
1 files changed, 19 insertions, 4 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 0c339f5..d5d9cbf 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -3331,7 +3331,7 @@
// - The presentation isn't paused
// - The overview isn't active
// - The presentation isn't over
- if( autoSlide && !autoSlidePaused && !isPaused() && !isOverview() && ( !Reveal.isLastSlide() || config.loop === true ) ) {
+ if( autoSlide && !autoSlidePaused && !isPaused() && !isOverview() && ( !Reveal.isLastSlide() || availableFragments().next || config.loop === true ) ) {
autoSlideTimeout = setTimeout( navigateNext, autoSlide );
autoSlideStartTime = Date.now();
}
@@ -3441,7 +3441,14 @@
}
else {
// Fetch the previous horizontal slide, if there is one
- var previousSlide = dom.wrapper.querySelector( HORIZONTAL_SLIDES_SELECTOR + '.past:nth-child(' + indexh + ')' );
+ var previousSlide;
+
+ if( config.rtl ) {
+ previousSlide = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR + '.future' ) ).pop();
+ }
+ else {
+ previousSlide = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR + '.past' ) ).pop();
+ }
if( previousSlide ) {
var v = ( previousSlide.querySelectorAll( 'section' ).length - 1 ) || undefined;
@@ -3454,13 +3461,21 @@
}
/**
- * Same as #navigatePrev() but navigates forwards.
+ * The reverse of #navigatePrev().
*/
function navigateNext() {
// Prioritize revealing fragments
if( nextFragment() === false ) {
- availableRoutes().down ? navigateDown() : navigateRight();
+ if( availableRoutes().down ) {
+ navigateDown();
+ }
+ else if( config.rtl ) {
+ navigateLeft();
+ }
+ else {
+ navigateRight();
+ }
}
// If auto-sliding is enabled we need to cue up