]> source.dussan.org Git - jquery-ui.git/commitdiff
Effects (Shake): Divide duration by number of animation steps. Fixed: #8531 - Shake...
authorBernhard Sirlinger <bernhard.sirlinger@tele2.de>
Thu, 30 Aug 2012 15:23:07 +0000 (11:23 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 30 Aug 2012 15:23:07 +0000 (11:23 -0400)
ui/jquery.ui.effect-shake.js

index fd9605d0a4399f5d093bea37af69640e6c30dd7b..9ae3968d6c9bce89d9ae60c744403ff1136bb371 100644 (file)
@@ -22,7 +22,7 @@ $.effects.effect.shake = function( o, done ) {
                distance = o.distance || 20,
                times = o.times || 3,
                anims = times * 2 + 1,
-               speed = o.duration,
+               speed = Math.round(o.duration/anims),
                ref = (direction === "up" || direction === "down") ? "top" : "left",
                positiveMotion = (direction === "up" || direction === "left"),
                animation = {},