diff --git a/demo.html b/demo.html index ab11f77248d..3d0a3bfe962 100644 --- a/demo.html +++ b/demo.html @@ -471,6 +471,8 @@

THE END

center: true, hash: true, + // disableLayout: true, + // Learn about plugins: https://revealjs.com/plugins/ plugins: [ RevealZoom, RevealNotes, RevealSearch, RevealMarkdown, RevealHighlight ] }); diff --git a/js/reveal.js b/js/reveal.js index ed20bc2f6f9..54b0980d8e4 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1002,11 +1002,18 @@ export default function( revealElement, options ) { * @param {number} [presentationHeight=dom.wrapper.offsetHeight] */ function getComputedSlideSize( presentationWidth, presentationHeight ) { + let width = config.width; + let height = config.height; + + if (config.disableLayout) { + width = dom.slides.offsetWidth; + height = dom.slides.offsetHeight; + } const size = { // Slide size - width: config.width, - height: config.height, + width: width, + height: height, // Presentation size presentationWidth: presentationWidth || dom.wrapper.offsetWidth,