Skip to content

Commit

Permalink
Fix overlap in overview when config.disableLayout === true
Browse files Browse the repository at this point in the history
  • Loading branch information
Proliecan committed Sep 29, 2022
1 parent 4681323 commit 9193e5c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,8 @@ <h1>THE END</h1>
center: true,
hash: true,

// disableLayout: true,

// Learn about plugins: https://revealjs.com/plugins/
plugins: [ RevealZoom, RevealNotes, RevealSearch, RevealMarkdown, RevealHighlight ]
});
Expand Down
11 changes: 9 additions & 2 deletions js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9193e5c

Please sign in to comment.