#732 closed defect (fixed)
[lfx] Problem with chaining two opposing effects together..
Reported by: | Owned by: | Bryan Forbes | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | General | Version: | 0.2 |
Keywords: | lfx chain | Cc: | |
Blocked By: | Blocking: |
Description
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 15 years ago by
Milestone: | 0.3.1 → 0.4 |
---|
comment:2 Changed 14 years ago by
Milestone: | 0.4 → 0.4.1 |
---|
comment:3 Changed 14 years ago by
Milestone: | 0.4.1 → 0.5 |
---|
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 14 years ago by
Milestone: | 0.5 → 0.4.1 |
---|
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 14 years ago by
comment:6 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
seems heng merged it in before I got it it = )
fixed in [6484]
Depends on #688 which won't be fixed until 0.4, so marking this one as 0.4