diff options
author | Hakim El Hattab | 2017-05-16 09:43:16 +0200 |
---|---|---|
committer | Hakim El Hattab | 2017-05-16 09:45:37 +0200 |
commit | 58dc6b7c3654f2c4383e608763ba84f3e0ea4221 (patch) | |
tree | 245465f40a17bafe8f5d0a5746c09ea043323c8f /js/reveal.js | |
parent | f8b5813e59db12a24f84cb705c70a31c39da7f38 (diff) |
adjust controls layout when there are no vertical or horizontal slides in the deck
Diffstat (limited to 'js/reveal.js')
-rw-r--r-- | js/reveal.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js index 02dbebe..42c3822 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -2739,6 +2739,22 @@ } } + // Flag if there are ANY vertical slides, anywhere in the deck + if( dom.wrapper.querySelectorAll( '.slides>section>section' ).length ) { + dom.wrapper.classList.add( 'has-vertical-slides' ); + } + else { + dom.wrapper.classList.remove( 'has-vertical-slides' ); + } + + // Flag if there are ANY horizontal slides, anywhere in the deck + if( dom.wrapper.querySelectorAll( '.slides>section:not(.stack)' ).length ) { + dom.wrapper.classList.add( 'has-horizontal-slides' ); + } + else { + dom.wrapper.classList.remove( 'has-horizontal-slides' ); + } + } } |