fix bug where isLastSlide sometimes incorrectly returned false
This commit is contained in:
parent
a7b348e83b
commit
f61ee9a693
15
js/reveal.js
15
js/reveal.js
|
@ -2759,12 +2759,17 @@ var Reveal = (function(){
|
||||||
|
|
||||||
// Returns true if we're currently on the last slide
|
// Returns true if we're currently on the last slide
|
||||||
isLastSlide: function() {
|
isLastSlide: function() {
|
||||||
if( currentSlide && currentSlide.classList.contains( '.stack' ) ) {
|
if( currentSlide ) {
|
||||||
return currentSlide.querySelector( SLIDES_SELECTOR + '.future' ) == null ? true : false;
|
// Does this slide has next a sibling?
|
||||||
}
|
if( currentSlide.nextElementSibling ) return false;
|
||||||
else {
|
|
||||||
return document.querySelector( SLIDES_SELECTOR + '.future' ) == null ? true : false;
|
// If it's vertical, does its parent have a next sibling?
|
||||||
|
if( isVerticalSlide( currentSlide ) && currentSlide.parentNode.nextElementSibling ) return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
// Checks if reveal.js has been loaded and is ready for use
|
// Checks if reveal.js has been loaded and is ready for use
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue