effects.pulsate: tweaking 'times' - if showing / hiding the animation has an extra 'half' time as opposed to removing a 'half' time

This commit is contained in:
gnarf 2011-05-03 10:48:00 -05:00
parent d5f6a71cfa
commit 126d46c050

View File

@ -19,8 +19,8 @@ $.effects.effect.pulsate = function( o ) {
show = mode === "show" || elem.is( ":hidden" ), show = mode === "show" || elem.is( ":hidden" ),
showhide = ( show || mode === "hide" ), showhide = ( show || mode === "hide" ),
// showing or hiding leaves of the "last" animation // showing or hiding adds an extra "half" animation
anims = ( ( o.times || 5 ) * 2 ) - ( showhide ? 1 : 0 ), anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
duration = o.duration / anims, duration = o.duration / anims,
animateTo = 0, animateTo = 0,
queue = elem.queue(), queue = elem.queue(),