Browse Source

rtl support for new sliding backgrounds

Hakim El Hattab 11 years ago
parent
commit
abb4ca8f2d
2 changed files with 6 additions and 2 deletions
  1. 5 1
      js/reveal.js
  2. 1 1
      js/reveal.min.js

+ 5 - 1
js/reveal.js

@@ -1524,7 +1524,11 @@ var Reveal = (function(){
 		// states of their slides (past/present/future)
 		// states of their slides (past/present/future)
 		toArray( dom.background.childNodes ).forEach( function( backgroundh, h ) {
 		toArray( dom.background.childNodes ).forEach( function( backgroundh, h ) {
 
 
-			backgroundh.className = 'slide-background ' + ( h < indexh ? 'past' : h > indexh ? 'future' : 'present' );
+			// Reverse past/future classes when in RTL mode
+			var horizontalPast = config.rtl ? 'future' : 'past',
+				horizontalFuture = config.rtl ? 'past' : 'future';
+
+			backgroundh.className = 'slide-background ' + ( h < indexh ? horizontalPast : h > indexh ? horizontalFuture : 'present' );
 
 
 			toArray( backgroundh.childNodes ).forEach( function( backgroundv, v ) {
 			toArray( backgroundh.childNodes ).forEach( function( backgroundv, v ) {
 
 

File diff suppressed because it is too large
+ 1 - 1
js/reveal.min.js


Some files were not shown because too many files changed in this diff