1
0
Hakim El Hattab 1 жил өмнө
parent
commit
1f1ca3a887

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/reveal.esm.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/reveal.esm.js.map


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/reveal.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/reveal.js.map


+ 5 - 7
js/controllers/reader.js

@@ -37,11 +37,10 @@ export default class Reader {
 		viewportElement.addEventListener( 'scroll', this.onScroll );
 
 		let presentationBackground;
-		if( viewportElement ) {
-			const viewportStyles = window.getComputedStyle( viewportElement );
-			if( viewportStyles && viewportStyles.background ) {
-				presentationBackground = viewportStyles.background;
-			}
+
+		const viewportStyles = window.getComputedStyle( viewportElement );
+		if( viewportStyles && viewportStyles.background ) {
+			presentationBackground = viewportStyles.background;
 		}
 
 		const pageElements = [];
@@ -59,8 +58,7 @@ export default class Reader {
 				page.className = 'reader-page';
 				pageElements.push( page );
 
-				// Copy the presentation-wide background to each individual
-				// page when printing
+				// Copy the presentation-wide background to each page
 				if( presentationBackground ) {
 					page.style.background = presentationBackground;
 				}

+ 10 - 2
js/reveal.js

@@ -214,6 +214,8 @@ export default function( revealElement, options ) {
 		// Create slide backgrounds
 		backgrounds.update( true );
 
+		activateInitialView();
+
 		// Notify listeners that the presentation is ready but use a 1ms
 		// timeout to ensure it's not fired synchronously after #initialize()
 		setTimeout( () => {
@@ -232,11 +234,17 @@ export default function( revealElement, options ) {
 			});
 		}, 1 );
 
+	}
+
+	/**
+	 * Activates the correct reveal.js view based on our config.
+	 * This is only invoked once during initialization.
+	 */
+	function activateInitialView() {
+
 		const activatePrintView = config.view === 'print';
 		const activateReaderView = config.view === 'reader';
 
-		// Special setup and config is required when initializing a deck
-		// to be read or printed linearly
 		if( activatePrintView || activateReaderView ) {
 
 			if( activatePrintView ) {

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно