Pārlūkot izejas kodu

data-autoslide on vertical parent now applies to all child slides #685

Hakim El Hattab 11 gadi atpakaļ
vecāks
revīzija
150cb81405
2 mainītis faili ar 7 papildinājumiem un 2 dzēšanām
  1. 6 1
      js/reveal.js
  2. 1 1
      js/reveal.min.js

+ 6 - 1
js/reveal.js

@@ -2327,12 +2327,17 @@ var Reveal = (function(){
 
 		if( currentSlide ) {
 
+			var parentAutoSlide = currentSlide.parentNode ? currentSlide.parentNode.getAttribute( 'data-autoslide' ) : null;
+			var slideAutoSlide = currentSlide.getAttribute( 'data-autoslide' );
+
 			// If the current slide has a data-autoslide use that,
 			// otherwise use the config.autoSlide value
-			var slideAutoSlide = currentSlide.getAttribute( 'data-autoslide' );
 			if( slideAutoSlide ) {
 				autoSlide = parseInt( slideAutoSlide, 10 );
 			}
+			else if( parentAutoSlide ) {
+				autoSlide = parseInt( parentAutoSlide, 10 );
+			}
 			else {
 				autoSlide = config.autoSlide;
 			}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
js/reveal.min.js


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels