Prechádzať zdrojové kódy

enable keyboard/touch flags to change in runtime configure() call (closes #365)

Hakim El Hattab 12 rokov pred
rodič
commit
e74a10e364
2 zmenil súbory, kde vykonal 15 pridanie a 4 odobranie
  1. 14 3
      js/reveal.js
  2. 1 1
      js/reveal.min.js

+ 14 - 3
js/reveal.js

@@ -306,9 +306,6 @@ var Reveal = (function(){
 		// Make sure we've got all the DOM elements we need
 		setupDOM();
 
-		// Subscribe to input
-		addEventListeners();
-
 		// Updates the presentation to match the current configuration values
 		configure();
 
@@ -394,6 +391,20 @@ var Reveal = (function(){
 			}
 		}
 
+		postConfigure();
+
+	}
+
+	/**
+	 * Updates various parts of the presentatio after the
+	 * configuration has changed.
+	 */
+	function postConfigure() {
+
+		// Subscribe to input
+		removeEventListeners();
+		addEventListeners();
+
 		// Force a layout to make sure the current config is accounted for
 		layout();
 

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
js/reveal.min.js


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov