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

This commit is contained in:
Hakim El Hattab committed 2017-05-16 09:45:37 +02:00
1 parent f8b5813e59
commit 58dc6b7c36
3 files changed
+170 -201

No files matched your search

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