Effects (Shake): Divide duration by number of animation steps. Fixed: #8531 - Shake effect: Duration is multiplied based on number of shakes.

This commit is contained in:
Bernhard Sirlinger 2012-08-30 11:23:07 -04:00 committed by Scott González
parent 13fa4a9dac
commit dec9c54632

View File

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