fix previous slide navigation logic (closes #397)
[reveal.js.git] / js / reveal.js
index ac1b8b8597ff5c04050b3f71bd740a4cc91b5811..516d114e83d2c950da5e42c3a0a4f281aeb2593c 100644 (file)
@@ -73,6 +73,9 @@ var Reveal = (function(){
                        // Transition style
                        transition: 'default', // default/cube/page/concave/zoom/linear/fade/none
 
+                       // Transition speed
+                       transitionSpeed: 'default', // default/fast/slow
+
                        // Script dependencies to load
                        dependencies: []
                },
@@ -340,6 +343,8 @@ var Reveal = (function(){
 
                dom.wrapper.classList.add( config.transition );
 
+               dom.wrapper.setAttribute( 'data-transition-speed', config.transitionSpeed );
+
                if( dom.controls ) {
                        dom.controls.style.display = ( config.controls && dom.controls ) ? 'block' : 'none';
                }
@@ -1622,7 +1627,7 @@ var Reveal = (function(){
                                if( previousSlide ) {
                                        indexv = ( previousSlide.querySelectorAll( 'section' ).length + 1 ) || undefined;
                                        indexh --;
-                                       slide();
+                                       slide( indexh, indexv );
                                }
                        }
                }