فهرست منبع

Fix RTL Navigation with space bar

Ira Abramov 11 سال پیش
والد
کامیت
ccdb4ff248
2فایلهای تغییر یافته به همراه9 افزوده شده و 2 حذف شده
  1. 1 1
      css/reveal.css
  2. 8 1
      js/reveal.js

+ 1 - 1
css/reveal.css

@@ -27,7 +27,7 @@ html, body, .reveal div, .reveal span, .reveal applet, .reveal object, .reveal i
 .reveal menu, .reveal nav, .reveal output, .reveal ruby, .reveal section, .reveal summary,
 .reveal menu, .reveal nav, .reveal output, .reveal ruby, .reveal section, .reveal summary,
 .reveal time, .reveal mark, .reveal audio, video {
 .reveal time, .reveal mark, .reveal audio, video {
 	margin: 0;
 	margin: 0;
-	padding: 0;
+	padding: 3m;
 	border: 0;
 	border: 0;
 	font-size: 100%;
 	font-size: 100%;
 	font: inherit;
 	font: inherit;

+ 8 - 1
js/reveal.js

@@ -3432,6 +3432,9 @@
 				if( previousSlide ) {
 				if( previousSlide ) {
 					var v = ( previousSlide.querySelectorAll( 'section' ).length - 1 ) || undefined;
 					var v = ( previousSlide.querySelectorAll( 'section' ).length - 1 ) || undefined;
 					var h = indexh - 1;
 					var h = indexh - 1;
+					if( config.rtl ) {
+						h = indexh + 1;
+					}
 					slide( h, v );
 					slide( h, v );
 				}
 				}
 			}
 			}
@@ -3446,7 +3449,11 @@
 
 
 		// Prioritize revealing fragments
 		// Prioritize revealing fragments
 		if( nextFragment() === false ) {
 		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
 		// If auto-sliding is enabled we need to cue up