Opened 7 years ago

Closed 6 years ago

#4718 closed bug (fixed)

pulsate pulses one extra time.

Reported by: urkle Owned by:
Priority: minor Milestone: 1.8
Component: ui.effects.* (individual effect) Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

Description

If i do a $('#someelement').effect("pulsate",{times:3},500);

I expect it to "pulse" 3 times, however it actually pulses 4.

This is more apparent if you want it to pulse 1 time.

$('#someelement').effect("pulsate",{times:1},500);

it actually fades out twice.

Change History (3)

comment:1 Changed 7 years ago by urkle

From looking at the source code it seem the code iterates through "times" number of times. And then does ONE more that calls the callback the user supplied.

Having the main for-loop start at i=1 instead of i=0 should resolve the issue. the isHidden case will of course need to be reviewed to determine if it needs to be "times - 2" or "times - 1" to make sure that case is correct as well.

comment:2 Changed 6 years ago by bobmajdakjr

i can confirm this issue for the past year it has bugged the hell out of me.

i can also confirm the fix works.

// c from zero to one
f=f-2}for(var c=1;c<f;c++){d

comment:3 Changed 6 years ago by scottgonzalez

  • Milestone changed from TBD to 1.8
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r3454.

Note: See TracTickets for help on using tickets.