Procházet zdrojové kódy

disable transitions while presentation loads

Hakim El Hattab před 10 roky
rodič
revize
49298e1991
2 změnil soubory, kde provedl 7 přidání a 1 odebrání
  1. 6 0
      js/reveal.js
  2. 1 1
      js/reveal.min.js

+ 6 - 0
js/reveal.js

@@ -218,6 +218,9 @@ var Reveal = (function(){
 		dom.wrapper = document.querySelector( '.reveal' );
 		dom.slides = document.querySelector( '.reveal .slides' );
 
+		// Prevent transitions while we're loading
+		dom.slides.classList.add( 'no-transition' );
+
 		// Background element
 		if( !document.querySelector( '.reveal .backgrounds' ) ) {
 			dom.background = document.createElement( 'div' );
@@ -444,6 +447,9 @@ var Reveal = (function(){
 		// Notify listeners that the presentation is ready but use a 1ms
 		// timeout to ensure it's not fired synchronously after #initialize()
 		setTimeout( function() {
+			// Enable transitions now that we're loaded
+			dom.slides.classList.remove( 'no-transition' );
+
 			dispatchEvent( 'ready', {
 				'indexh': indexh,
 				'indexv': indexv,

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
js/reveal.min.js


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů