Răsfoiți Sursa

Fix overview spacing for disabled auto layout (#3291)

* Fix overlap in overview when config.disableLayout === true

* run gulp js
after commit 9193e5cd5d6d1aa234803b753c6d032b801a8221

---------

Co-authored-by: Hakim El Hattab <hakim.elhattab@gmail.com>
Elliot" Constantin H 2 ani în urmă
părinte
comite
dcae8a4dc9
4 a modificat fișierele cu 11 adăugiri și 2 ștergeri
  1. 2 0
      demo.html
  2. 0 0
      dist/reveal.esm.js.map
  3. 0 0
      dist/reveal.js.map
  4. 9 2
      js/reveal.js

+ 2 - 0
demo.html

@@ -471,6 +471,8 @@ Reveal.on( 'customevent', function() {
 				center: true,
 				hash: true,
 
+				// disableLayout: true,
+
 				// Learn about plugins: https://revealjs.com/plugins/
 				plugins: [ RevealZoom, RevealNotes, RevealSearch, RevealMarkdown, RevealHighlight ]
 			});

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
dist/reveal.esm.js.map


Fișier diff suprimat deoarece este prea mare
+ 0 - 0
dist/reveal.js.map


+ 9 - 2
js/reveal.js

@@ -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,

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff