Browse Source

fix progress bar clicks in rtl mode #1131

Hakim El Hattab 10 years ago
parent
commit
f772c7eb50
1 changed files with 4 additions and 0 deletions
  1. 4 0
      js/reveal.js

+ 4 - 0
js/reveal.js

@@ -4001,6 +4001,10 @@
 		var slidesTotal = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).length;
 		var slideIndex = Math.floor( ( event.clientX / dom.wrapper.offsetWidth ) * slidesTotal );
 
+		if( config.rtl ) {
+			slideIndex = slidesTotal - slideIndex;
+		}
+
 		slide( slideIndex );
 
 	}