adjust controls layout when there are no vertical or horizontal slides in the deck
This commit is contained in:
parent
f8b5813e59
commit
58dc6b7c36
3 changed files with 170 additions and 201 deletions
16
js/reveal.js
16
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' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue