add support for overriding the default layout (#2121)

* add support for overriding the default layout
New `overrideLayout` option (if true) will prevent h/w calcs.

* fix error if options are empty

* Implement requested changes
Rename overrideLayout to disableLayout and remove code to unset display
edit
Steve Hartzog 2018-03-22 06:06:19 -04:00 committed by Hakim El Hattab
parent ea57e697a1
commit 9dbccd6978
1 changed files with 61 additions and 53 deletions

View File

@ -84,6 +84,10 @@
// Enable the slide overview mode
overview: true,
// Enable/disable user specified layouts (like css-grid)
// (basically prevents all the display & height/width calculations)
disableLayout: false,
// Vertical centering of slides
center: true,
@ -1853,6 +1857,8 @@
if( dom.wrapper && !isPrintingPDF() ) {
if( !config.disableLayout ) {
var size = getComputedSlideSize();
// Layout the contents of the slides
@ -1927,6 +1933,8 @@
}
}
updateProgress();
updateParallax();