瀏覽代碼

rtl support for new sliding backgrounds

Hakim El Hattab 11 年之前
父節點
當前提交
abb4ca8f2d
共有 2 個文件被更改,包括 6 次插入2 次删除
  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)
 		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 ) {
 

文件差異過大導致無法顯示
+ 1 - 1
js/reveal.min.js


部分文件因文件數量過多而無法顯示