Skip to content

Commit dcae8a4

Browse files
Proliecanhakimel
andauthored
Fix overview spacing for disabled auto layout (#3291)
* Fix overlap in overview when config.disableLayout === true * run gulp js after commit 9193e5c --------- Co-authored-by: Hakim El Hattab <hakim.elhattab@gmail.com>
1 parent 7de6ccb commit dcae8a4

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

demo.html

+2
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,8 @@ <h1>THE END</h1>
471471
center: true,
472472
hash: true,
473473

474+
// disableLayout: true,
475+
474476
// Learn about plugins: https://revealjs.com/plugins/
475477
plugins: [ RevealZoom, RevealNotes, RevealSearch, RevealMarkdown, RevealHighlight ]
476478
});

dist/reveal.esm.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/reveal.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/reveal.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -1006,11 +1006,18 @@ export default function( revealElement, options ) {
10061006
* @param {number} [presentationHeight=dom.wrapper.offsetHeight]
10071007
*/
10081008
function getComputedSlideSize( presentationWidth, presentationHeight ) {
1009+
let width = config.width;
1010+
let height = config.height;
1011+
1012+
if (config.disableLayout) {
1013+
width = dom.slides.offsetWidth;
1014+
height = dom.slides.offsetHeight;
1015+
}
10091016

10101017
const size = {
10111018
// Slide size
1012-
width: config.width,
1013-
height: config.height,
1019+
width: width,
1020+
height: height,
10141021

10151022
// Presentation size
10161023
presentationWidth: presentationWidth || dom.wrapper.offsetWidth,

0 commit comments

Comments
 (0)