Преглед на файлове

minor refactoring of overview code

Hakim El Hattab преди 11 години
родител
ревизия
e9b0f5b481
променени са 4 файла, в които са добавени 12 реда и са изтрити 18 реда
  1. 2 2
      css/reveal.css
  2. 0 0
      css/reveal.min.css
  3. 9 15
      js/reveal.js
  4. 1 1
      js/reveal.min.js

+ 2 - 2
css/reveal.css

@@ -1050,8 +1050,8 @@ body {
 
 .reveal.fade.overview .slides section,
 .reveal.fade.overview .slides>section>section,
-.reveal.fade.exit-overview .slides section,
-.reveal.fade.exit-overview .slides>section>section {
+.reveal.fade.overview-deactivating .slides section,
+.reveal.fade.overview-deactivating .slides>section>section {
 	-webkit-transition: none;
 	   -moz-transition: none;
 	    -ms-transition: none;

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
css/reveal.min.css


+ 9 - 15
js/reveal.js

@@ -1156,7 +1156,7 @@ var Reveal = (function(){
 			var depth = window.innerWidth < 400 ? 1000 : 2500;
 
 			dom.wrapper.classList.add( 'overview' );
-			dom.wrapper.classList.remove( 'exit-overview' );
+			dom.wrapper.classList.remove( 'overview-deactivating' );
 
 			clearTimeout( activateOverviewTimeout );
 			clearTimeout( deactivateOverviewTimeout );
@@ -1164,7 +1164,7 @@ var Reveal = (function(){
 			// Not the pretties solution, but need to let the overview
 			// class apply first so that slides are measured accurately
 			// before we can position them
-			activateOverviewTimeout = setTimeout( function(){
+			activateOverviewTimeout = setTimeout( function() {
 
 				var horizontalSlides = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR );
 
@@ -1241,25 +1241,19 @@ var Reveal = (function(){
 			// Temporarily add a class so that transitions can do different things
 			// depending on whether they are exiting/entering overview, or just
 			// moving from slide to slide
-			dom.wrapper.classList.add( 'exit-overview' );
+			dom.wrapper.classList.add( 'overview-deactivating' );
 
 			deactivateOverviewTimeout = setTimeout( function () {
-				dom.wrapper.classList.remove( 'exit-overview' );
-			}, 10);
+				dom.wrapper.classList.remove( 'overview-deactivating' );
+			}, 1 );
 
 			// Select all slides
-			var slides = toArray( document.querySelectorAll( SLIDES_SELECTOR ) );
-
-			for( var i = 0, len = slides.length; i < len; i++ ) {
-				var element = slides[i];
-
-				element.style.display = '';
-
+			toArray( document.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) {
 				// Resets all transforms to use the external styles
-				transformElement( element, '' );
+				transformElement( slide, '' );
 
-				element.removeEventListener( 'click', onOverviewSlideClicked, true );
-			}
+				slide.removeEventListener( 'click', onOverviewSlideClicked, true );
+			} );
 
 			slide( indexh, indexv );
 

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
js/reveal.min.js


Някои файлове не бяха показани, защото твърде много файлове са промени