Fix Inner nav. doesnt work if slide is the last.
This commit is contained in:
parent
4c25374328
commit
d123cd9551
12
shower.js
12
shower.js
|
@ -73,20 +73,15 @@ window.shower = window.shower || (function(window, document, undefined) {
|
||||||
|
|
||||||
if (slide.isFinished()) {
|
if (slide.isFinished()) {
|
||||||
timer = setInterval(function() {
|
timer = setInterval(function() {
|
||||||
console.log('fin');
|
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
if ( ! slide.isLast()) {
|
|
||||||
shower.next();
|
shower.next();
|
||||||
}
|
|
||||||
},
|
},
|
||||||
slide.timing * (slide.innerLength || 1));
|
slide.timing * (slide.innerLength || 1));
|
||||||
} else {
|
} else {
|
||||||
timer = setInterval(function() {
|
timer = setInterval(function() {
|
||||||
if (slide.isFinished()) {
|
if (slide.isFinished()) {
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
if ( ! slide.isLast()) {
|
|
||||||
shower.next();
|
shower.next();
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
slide.next(shower);
|
slide.next(shower);
|
||||||
}
|
}
|
||||||
|
@ -131,11 +126,9 @@ window.shower = window.shower || (function(window, document, undefined) {
|
||||||
slide = this;
|
slide = this;
|
||||||
|
|
||||||
if ( ! slide.hasInnerNavigation || slide.isFinished()) {
|
if ( ! slide.hasInnerNavigation || slide.isFinished()) {
|
||||||
if ( ! slide.isLast()) {
|
|
||||||
shower.next();
|
shower.next();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! slide.isFinished()) {
|
if ( ! slide.isFinished()) {
|
||||||
nextSteps = document.getElementById(slide.id).querySelectorAll('.next:not(.active)');
|
nextSteps = document.getElementById(slide.id).querySelectorAll('.next:not(.active)');
|
||||||
|
@ -395,11 +388,6 @@ window.shower = window.shower || (function(window, document, undefined) {
|
||||||
ret = false,
|
ret = false,
|
||||||
slide;
|
slide;
|
||||||
|
|
||||||
// If don't exist next slide
|
|
||||||
if (! nextSlide) {
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
slide = shower.slideList[currentSlideNumber];
|
slide = shower.slideList[currentSlideNumber];
|
||||||
|
|
||||||
if (shower.isSlideMode()) {
|
if (shower.isSlideMode()) {
|
||||||
|
|
Loading…
Reference in New Issue