From 9193e5cd5d6d1aa234803b753c6d032b801a8221 Mon Sep 17 00:00:00 2001
From: "Elliot (aka. Proliecan)" <65495509+Proliecan@users.noreply.github.com>
Date: Thu, 29 Sep 2022 09:37:56 +0200
Subject: [PATCH] Fix overlap in overview when config.disableLayout === true
---
demo.html | 2 ++
js/reveal.js | 11 +++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
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,