From: Bernhard Sirlinger Date: Thu, 30 Aug 2012 15:23:07 +0000 (-0400) Subject: Effects (Shake): Divide duration by number of animation steps. Fixed: #8531 - Shake... X-Git-Tag: 1.9.0~40 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dec9c54632be191947c310b402810cf6f1b4250a;p=jquery-ui.git Effects (Shake): Divide duration by number of animation steps. Fixed: #8531 - Shake effect: Duration is multiplied based on number of shakes. --- diff --git a/ui/jquery.ui.effect-shake.js b/ui/jquery.ui.effect-shake.js index fd9605d0a..9ae3968d6 100644 --- a/ui/jquery.ui.effect-shake.js +++ b/ui/jquery.ui.effect-shake.js @@ -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 = {},