Skip to content

Commit

Permalink
Fix overview spacing for disabled auto layout (#3291)
Browse files Browse the repository at this point in the history
* Fix overlap in overview when config.disableLayout === true

* run gulp js
after commit 9193e5cd5d6d1aa234803b753c6d032b801a8221

---------

Co-authored-by: Hakim El Hattab <[email protected]>
  • Loading branch information
Proliecan and hakimel authored Feb 22, 2023
1 parent 7de6ccb commit dcae8a4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 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
2 changes: 1 addition & 1 deletion dist/reveal.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.js.map

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -1006,11 +1006,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 dcae8a4

Please sign in to comment.