Fix issue with inner navigation.

It was working in list mode.
This commit is contained in:
Oleg Roschupkin 2012-03-01 18:05:36 +09:00
parent 992b467b9f
commit ae328760c3
1 changed files with 15 additions and 7 deletions

View File

@ -223,7 +223,8 @@
// Shortcut for alt, shift and meta keys // Shortcut for alt, shift and meta keys
if (e.altKey || e.ctrlKey || e.metaKey) { return; } if (e.altKey || e.ctrlKey || e.metaKey) { return; }
var currentSlideNumber = getCurrentSlideNumber(); var currentSlideNumber = getCurrentSlideNumber(),
innerNavigationCompleted = true;
switch (e.which) { switch (e.which) {
case 116: // F5 case 116: // F5
@ -268,16 +269,23 @@
case 74: // j case 74: // j
e.preventDefault(); e.preventDefault();
// Only go to next slide if current slide have no inner if (!isListMode() ) {
// navigation or inner navigation is fully shown // Inner navigation is "completed" if current slide have
// NOTE: But first of all check if there is no current slide // no inner navigation or inner navigation is fully shown
innerNavigationCompleted = !slideList[currentSlideNumber].hasInnerNavigation ||
-1 === increaseInnerNavigation(currentSlideNumber);
} else {
// Also inner navigation is always "completed" if we are in
// list mode
innerNavigationCompleted = true;
}
// NOTE: First of all check if there is no current slide
if ( if (
-1 === currentSlideNumber || -1 === currentSlideNumber || innerNavigationCompleted
!slideList[currentSlideNumber].hasInnerNavigation ||
-1 === increaseInnerNavigation(currentSlideNumber)
) { ) {
currentSlideNumber++; currentSlideNumber++;
goToSlide(currentSlideNumber); goToSlide(currentSlideNumber);
// We must run slideshow only in full mode
if (!isListMode()) { if (!isListMode()) {
runSlideshowIfPresented(currentSlideNumber); runSlideshowIfPresented(currentSlideNumber);
} }