From abb4ca8f2da34245b82931fcf99bede3e76d5481 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 10 Jun 2013 08:55:59 +0200 Subject: rtl support for new sliding backgrounds --- js/reveal.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'js/reveal.js') diff --git a/js/reveal.js b/js/reveal.js index b3ccffe..24960cd 100644 --- a/js/reveal.js +++ b/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 ) { -- cgit v1.2.3