remove styles from #1030, simplify navigatePrev

edit
Hakim El Hattab 2014-10-16 15:43:29 +02:00
commit 6c7ba34edf
1 changed files with 9 additions and 8 deletions

View File

@ -3426,13 +3426,10 @@
navigateUp();
}
else {
// Fetch the previous horizontal slide, if there is one
var previousSlide = dom.wrapper.querySelector( HORIZONTAL_SLIDES_SELECTOR + '.past:nth-child(' + indexh + ')' );
if( previousSlide ) {
var v = ( previousSlide.querySelectorAll( 'section' ).length - 1 ) || undefined;
var h = indexh - 1;
slide( h, v );
if( config.rtl ) {
navigateRight();
} else {
navigateLeft();
}
}
}
@ -3446,8 +3443,12 @@
// Prioritize revealing fragments
if( nextFragment() === false ) {
if( config.rtl ) {
availableRoutes().down ? navigateDown() : navigateLeft();
} else {
availableRoutes().down ? navigateDown() : navigateRight();
}
}
// If auto-sliding is enabled we need to cue up
// another timeout