Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#732 closed defect (fixed)

[lfx] Problem with chaining two opposing effects together..

Reported by: [email protected] Owned by: Bryan Forbes
Priority: high Milestone:
Component: General Version: 0.2
Keywords: lfx chain Cc:
Blocked By: Blocking:


The following code does not work (fadeOut works fine, but fadeIn does not work at all):

var fadeOut = dojo.lfx.fadeOut(dojo.byId('element'), 750); var fadeIn = dojo.lfx.fadeIn(dojo.byId('element'), 750); dojo.lfx.chain(fadeOut, fadeIn).play();

In IRC, Bryan said the following:

[Wednesday, 05/17 - 01:06:44 PM] mxpxpod: flashbang: that's because when you instantiate the fadeIn, it's grabbing the values from the node at instantiation

Instead, in order to get this code to work, it needs to be structured this way:

dojo.lfx.fadeOut(dojo.byId('victim'), 750, null, function(){ dojo.lfx.fadeIn(dojo.byId('victim'), 750).play() }).play(1500);

This bug affects not just the fade effects, but also the wipe and slide effects.

Change History (7)

comment:1 Changed 16 years ago by bill


Depends on #688 which won't be fixed until 0.4, so marking this one as 0.4

comment:2 Changed 16 years ago by dylan


comment:3 Changed 16 years ago by bill


This is a consequence of

1) the design decision (is that the right phrase?) that fadeIn() and fadeOut() go from the current opacity value to fully shown (or fully hidden), rather than going from 0 to 1. 2) the fact that fadeIn/fadeOut grabs the values from the node when the animation is created, rather than when the animation is started (ie, played).

Not sure how hard it is to change #2. Tempted to bump this bug to 0.5. Bryan?

comment:4 Changed 16 years ago by bill


Bryan said that Alex has already fixed this, so he's just gonna checkin a test_fades.html and close the bug.

comment:5 Changed 16 years ago by alex

(In [6482]) adding a test page for chained fades. refs #732. The merge to the 0.4.1 working branch will fix.

comment:6 Changed 16 years ago by alex

Resolution: fixed
Status: newclosed

seems heng merged it in before I got it it = )

fixed in [6484]

comment:7 Changed 15 years ago by (none)

Milestone: 0.4.1

Milestone 0.4.1 deleted

Note: See TracTickets for help on using tickets.