fix progress bar clicks in rtl mode #1131

This commit is contained in:
Hakim El Hattab 2015-02-25 13:31:41 +01:00
parent ea735f0a2f
commit f772c7eb50

View File

@ -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 );
}