Selaa lähdekoodia

make sure stretch works with video

Hakim El Hattab 11 vuotta sitten
vanhempi
sitoutus
0a021845df
2 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 2 2
      js/reveal.js
  2. 1 1
      js/reveal.min.js

+ 2 - 2
js/reveal.js

@@ -1081,8 +1081,8 @@ var Reveal = (function(){
 
 			// Consider the aspect ratio of media elements
 			if( /(img|video)/gi.test( element.nodeName ) ) {
-				var nw = element.naturalWidth,
-					nh = element.naturalHeight;
+				var nw = element.naturalWidth || element.videoWidth,
+					nh = element.naturalHeight || element.videoHeight;
 
 				var es = Math.min( width / nw, remainingHeight / nh );
 

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
js/reveal.min.js


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä