#2613 closed defect (fixed)
dojo.html.Chain does not fire onEnd when play invoked with zero length animations
Reported by: | Owned by: | Bryan Forbes | |
---|---|---|---|
Priority: | high | Milestone: | 0.9beta |
Component: | lfx | Version: | 0.4.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
The play() method of dojo.html.Chain directly returns if this._anims.length is zero:
<snip> dojo.lfx.Chain.play = function (delay, gotoStart) {
if( !this._anims.length ) { return this; /*dojo.lfx.Chain*/}
if( gotoStart !this._anims[this._currAnim] ) { this._currAnim = 0;
</snip>
In this case the onEnd handler for the chain itself is not invoked (this is usually invoked by the last sub-animation in the chain). Perhaps this should be as follows:
<snip> dojo.lfx.Chain.play = function (delay, gotoStart) {
if( !this._anims.length ) { this.fire("onEnd"); return this; /*dojo.lfx.Chain*/}
if( gotoStart !this._anims[this._currAnim] ) { this._currAnim = 0;
</snip>
Change History (3)
comment:1 Changed 14 years ago by
Component: | General → lfx |
---|---|
Owner: | changed from anonymous to Bryan Forbes |
comment:2 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 14 years ago by
Milestone: | → 0.9beta |
---|
Note: See
TracTickets for help on using
tickets.
currently, chain will return undefined if an empty array is passed in.