From 0402fbde0c53824a0f279bdc1f44bd967ce35cb2 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sat, 17 Nov 2012 15:59:28 -0500 Subject: experimental rtl support (#166) --- js/reveal.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'js/reveal.js') diff --git a/js/reveal.js b/js/reveal.js index 7666b9d..f683609 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -36,6 +36,9 @@ var Reveal = (function(){ // Loop the presentation loop: false, + // Experimental support for RTL + rtl: false, + // Number of milliseconds between automatically proceeding to the // next slide, disabled when set to 0, this value can be overwritten // by using a data-autoslide attribute on your slides @@ -141,6 +144,7 @@ var Reveal = (function(){ // Cache references to key DOM elements dom.theme = document.querySelector( '#theme' ); dom.wrapper = document.querySelector( '.reveal' ); + dom.slides = document.querySelector( '.reveal .slides' ); // Progress bar if( !dom.wrapper.querySelector( '.progress' ) && config.progress ) { @@ -313,6 +317,10 @@ var Reveal = (function(){ dom.wrapper.classList.add( config.transition ); } + if( config.rtl ) { + dom.slides.style.direction = 'rtl'; + } + if( config.center ) { dom.wrapper.classList.add( 'center' ); } -- cgit v1.2.3