Parcourir la source

fix issue with background images on first vertical sldie

Hakim El Hattab il y a 11 ans
Parent
commit
9873839a50
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      js/reveal.js

+ 3 - 3
js/reveal.js

@@ -2332,8 +2332,8 @@
 		if( background.hasAttribute( 'data-loaded' ) === false ) {
 			background.setAttribute( 'data-loaded', 'true' );
 
-			var backgroundImage = slide.getAttribute( 'data-background-image' );
-			var backgroundVideo = slide.getAttribute( 'data-background-video' );
+			var backgroundImage = slide.getAttribute( 'data-background-image' ),
+				backgroundVideo = slide.getAttribute( 'data-background-video' );
 
 			// Images
 			if( backgroundImage ) {
@@ -2673,7 +2673,7 @@
 			h = Math.max( horizontalSlides.indexOf( slideh ), 0 );
 
 			// Assume we're not vertical
-			v = 0;
+			v = undefined;
 
 			// If this is a vertical slide, grab the vertical index
 			if( isVertical ) {