Ticket #4083 (closed defect: fixed)
dojo.fx.chain/combine destructive
| Reported by: | dante | Owned by: | elazutkin |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1 |
| Component: | fx | Version: | 0.9 |
| Severity: | major | Keywords: | |
| Cc: | BryanForbes, alex, tk |
Description
dojo.fx.combine mangles passed _Animations:
var anim1 = new dojo._Animation(); ... var anim4 = dojo.fx.combine([anim1,anim2,anim3]); anim1.play(); // === anim4.play(); === anim2.play() etc.
the code looks like it only clobbers the first animation, but affects all.
if fx.combine would return a new _Animation of the combined effects, the issue would be resolved?
dojo.fx.chain should probably return a new _Animation as well:
var anim4 = dojo.fx.chain([anim1,anim2,anim3]); anim1.play(); // === anim4.play()
this does seem to be entirely intuitive behavior. (seems like anim1 should still be anim1, and anim4 should be the resulting animation of the chain, or even more simple: a 'null' animation that connects to onEnd of each, and plays each other animation in order)