fix progress bar clicks in rtl mode #1131

edit
Hakim El Hattab 2015-02-25 13:31:41 +01:00
parent ea735f0a2f
commit f772c7eb50
1 changed files with 4 additions and 0 deletions

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