Explorar o código

Fixed the bug when fading effect is longer than then slideshow delay

Jay Salvat %!s(int64=14) %!d(string=hai) anos
pai
achega
ca82967f21
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      jquery.vegas.js

+ 5 - 1
jquery.vegas.js

@@ -181,7 +181,7 @@
                 }
 
                 if ( options.preload ) {
-                    $.vegas( 'preload', options.backgrounds )
+                    $.vegas( 'preload', options.backgrounds );
                 }
             }
 
@@ -207,6 +207,10 @@
                 var settings = backgrounds[ step++ ];
                 settings.walk = options.walk;
 
+                if ( settings.fade > options.delay ) {
+                    settings.fade = options.delay;
+                }
+
                 $.vegas( settings );
             }
             doSlideshow();