adjust controls layout when there are no vertical or horizontal slides in the deck

This commit is contained in:
Hakim El Hattab
2017-05-16 09:43:16 +02:00
parent f8b5813e59
commit 58dc6b7c36
3 changed files with 170 additions and 201 deletions

View File

@ -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' );
}
}
}