forked from campiaperti/infra
better fix (issue: #285)
This commit is contained in:
parent
05b5255d60
commit
905ec83d53
2 changed files with 16 additions and 1 deletions
15
js/reveal.js
15
js/reveal.js
|
@ -877,6 +877,21 @@ var Reveal = (function(){
|
|||
// stacks
|
||||
if( previousSlide ) {
|
||||
previousSlide.classList.remove( 'present' );
|
||||
|
||||
// Reset all slides upon navigate to home
|
||||
// Issue: #285
|
||||
if ( document.querySelector(HOME_SLIDE_SELECTOR).classList.contains('present') ) {
|
||||
// Launch async task
|
||||
setTimeout(function () {
|
||||
var slides = toArray( document.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR + '.stack')), i;
|
||||
for ( i in slides ) {
|
||||
if (slides[i]) {
|
||||
// Reset stack
|
||||
setPreviousVerticalIndex(slides[i], 0);
|
||||
}
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
updateControls();
|
||||
|
|
2
js/reveal.min.js
vendored
2
js/reveal.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue