소스 검색

remove styles from #1030, simplify navigatePrev

Hakim El Hattab 10 년 전
부모
커밋
6c7ba34edf
1개의 변경된 파일9개의 추가작업 그리고 8개의 파일을 삭제
  1. 9 8
      js/reveal.js

+ 9 - 8
js/reveal.js

@@ -3426,13 +3426,10 @@
 				navigateUp();
 			}
 			else {
-				// Fetch the previous horizontal slide, if there is one
-				var previousSlide = dom.wrapper.querySelector( HORIZONTAL_SLIDES_SELECTOR + '.past:nth-child(' + indexh + ')' );
-
-				if( previousSlide ) {
-					var v = ( previousSlide.querySelectorAll( 'section' ).length - 1 ) || undefined;
-					var h = indexh - 1;
-					slide( h, v );
+				if( config.rtl ) {
+					navigateRight();
+				} else {
+					navigateLeft();
 				}
 			}
 		}
@@ -3446,7 +3443,11 @@
 
 		// Prioritize revealing fragments
 		if( nextFragment() === false ) {
-			availableRoutes().down ? navigateDown() : navigateRight();
+			if( config.rtl ) {
+				availableRoutes().down ? navigateDown() : navigateLeft();
+			} else {
+				availableRoutes().down ? navigateDown() : navigateRight();
+			}
 		}
 
 		// If auto-sliding is enabled we need to cue up