diff options
author | karimsa | 2013-01-11 16:43:43 -0500 |
---|---|---|
committer | karimsa | 2013-01-11 16:43:43 -0500 |
commit | 905ec83d535f7096c16f60ce085963c7fc21328c (patch) | |
tree | 98f955097d8155c4dcb3966ef26ff037e61dcaa3 /js/reveal.js | |
parent | 05b5255d6046d7b87a691f8f7ea8a397f60a0eaa (diff) |
better fix (issue: #285)
Diffstat (limited to 'js/reveal.js')
-rw-r--r-- | js/reveal.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js index 9e52b5f..324ed99 100644 --- a/js/reveal.js +++ b/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(); |