From 5662b1c1709745531825557367c8e1200e4d7f88 Mon Sep 17 00:00:00 2001 From: Bernhard Sirlinger Date: Thu, 30 Aug 2012 13:53:51 +0300 Subject: [PATCH 1/2] Fixed: #8531 Shake effect: Duration is multiplied based on number of shakes I changed the speed generation to Math.round(o.duration/times) to ensure that the given amount of time is the time the animation takes to complete. --- ui/jquery.ui.effect-shake.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/jquery.ui.effect-shake.js b/ui/jquery.ui.effect-shake.js index fd9605d0a43..c7a8d56c67e 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/times), ref = (direction === "up" || direction === "down") ? "top" : "left", positiveMotion = (direction === "up" || direction === "left"), animation = {}, From 507d05604333aa3472cce46fd374e5f9707ae2cc Mon Sep 17 00:00:00 2001 From: Bernhard Sirlinger Date: Thu, 30 Aug 2012 17:33:33 +0300 Subject: [PATCH 2/2] Update ui/jquery.ui.effect-shake.js Changed to anims --- ui/jquery.ui.effect-shake.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/jquery.ui.effect-shake.js b/ui/jquery.ui.effect-shake.js index c7a8d56c67e..9ae3968d6c9 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 = Math.round(o.duration/times), + speed = Math.round(o.duration/anims), ref = (direction === "up" || direction === "down") ? "top" : "left", positiveMotion = (direction === "up" || direction === "left"), animation = {},