Ver código fonte

Try to keep the container height

Jay Salvat 10 anos atrás
pai
commit
d36ae656d0
5 arquivos alterados com 15 adições e 13 exclusões
  1. 9 9
      dist/vegas.css
  2. 4 4
      dist/vegas.js
  3. 0 0
      dist/vegas.min.js
  4. 0 0
      dist/vegas.min.js.map
  5. 2 0
      src/vegas.js

+ 9 - 9
dist/vegas.css

@@ -294,7 +294,7 @@ body.vegas-container {
     }
 }
 @keyframes kenburns {
-    0%   {
+    0% {
         -webkit-transform: scale(1.5);
                 transform: scale(1.5);
     }
@@ -321,7 +321,7 @@ body.vegas-container {
     }
 }
 @keyframes kenburnsUp {
-    0%   {
+    0% {
         -webkit-transform: scale(1.5) translate(0, 10%);
                 transform: scale(1.5) translate(0, 10%);
     }
@@ -348,7 +348,7 @@ body.vegas-container {
     }
 }
 @keyframes kenburnsDown {
-    0%   {
+    0% {
         -webkit-transform: scale(1.5) translate(0, -10%);
                 transform: scale(1.5) translate(0, -10%);
     }
@@ -375,7 +375,7 @@ body.vegas-container {
     }
 }
 @keyframes kenburnsLeft {
-    0%   {
+    0% {
         -webkit-transform: scale(1.5) translate(10%, 0);
                 transform: scale(1.5) translate(10%, 0);
     }
@@ -402,7 +402,7 @@ body.vegas-container {
     }
 }
 @keyframes kenburnsRight {
-    0%   {
+    0% {
         -webkit-transform: scale(1.5) translate(-10%, 0);
                 transform: scale(1.5) translate(-10%, 0);
     }
@@ -429,7 +429,7 @@ body.vegas-container {
     }
 }
 @keyframes kenburnsUpLeft {
-    0%   {
+    0% {
         -webkit-transform: scale(1.5) translate(10%, 10%);
                 transform: scale(1.5) translate(10%, 10%);
     }
@@ -456,7 +456,7 @@ body.vegas-container {
     }
 }
 @keyframes kenburnsUpRight {
-    0%   {
+    0% {
         -webkit-transform: scale(1.5) translate(-10%, 10%);
                 transform: scale(1.5) translate(-10%, 10%);
     }
@@ -483,7 +483,7 @@ body.vegas-container {
     }
 }
 @keyframes kenburnsDownLeft {
-    0%   {
+    0% {
         -webkit-transform: scale(1.5) translate(10%, -10%);
                 transform: scale(1.5) translate(10%, -10%);
     }
@@ -510,7 +510,7 @@ body.vegas-container {
     }
 }
 @keyframes kenburnsDownRight {
-    0%   {
+    0% {
         -webkit-transform: scale(1.5) translate(-10%, -10%);
                 transform: scale(1.5) translate(-10%, -10%);
     }

+ 4 - 4
dist/vegas.js

@@ -128,6 +128,8 @@
 
             // Wrapper with content
             if (!isBody) {
+                this.$elmt.css('height', this.$elmt.css('height'));
+                
                 $wrapper = $('<div class="vegas-wrapper">')
                     .css('overflow', this.$elmt.css('overflow'))
                     .css('padding',  this.$elmt.css('padding'));
@@ -315,12 +317,10 @@
                 console.error("Vegas: Animation " + animation + " doesn't exist.");
             }
 
-            if (animationDuration === 'auto' || animationDuration > delay) {
+            if (animationDuration === 'auto') {
                 animationDuration = delay;
             }
 
-            console.log(animationDuration);
-
             // Video ?
 
             if (this.support.video && videos) {
@@ -596,7 +596,7 @@
     $.vegas.defaults = defaults;
 
     $.vegas.isVideoCompatible = function () {
-        return /(Android|webOS|Phone|iPad|iPod|BlackBerry|Windows Phone)/i.test(navigator.userAgent);
+        return !/(Android|webOS|Phone|iPad|iPod|BlackBerry|Windows Phone)/i.test(navigator.userAgent);
     };
 
 })(typeof jQuery !== 'undefined' ? jQuery :

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/vegas.min.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/vegas.min.js.map


+ 2 - 0
src/vegas.js

@@ -119,6 +119,8 @@
 
             // Wrapper with content
             if (!isBody) {
+                this.$elmt.css('height', this.$elmt.css('height'));
+                
                 $wrapper = $('<div class="vegas-wrapper">')
                     .css('overflow', this.$elmt.css('overflow'))
                     .css('padding',  this.$elmt.css('padding'));

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff