Opened 8 years ago

Closed 6 years ago

#17673 closed defect (patchwelcome)

A bug of dojo's fx.combine

Reported by: wangjm Owned by: dylan
Priority: high Milestone: 1.13
Component: fx Version: 1.9.2
Keywords: Cc:
Blocked By: Blocking:


In the "Dojo Effect Tutorial",you said:"the dojo/fx module gives us a couple of great convenience methods to set up effects to run in sequence or in parallel, and each method returns '''a new dojo/_base/fx::Animation object''' with its own set of events and methods that represent the entire sequence." But when I write some code like this:

var anim = fx.combine(....); 

An error will be raised.(Error: Target must be an event emitter). From the sourceCode I found that,the fx.chain is extend from "dojo/Evented" by this line:

_chain.prototype = new Evented();

so the object returned by fx.chain can use "on" to bind event.But there is not the same code about the fx.combine. Why?And how can I bind the "onEnd" event to the new combined anim.

The same thing happend when I want to bind event to the anim which is returen by NodeList?-fx. It sames that the returned object from the fx.combine is not exactly a "new dojo/_base/fx::Animation object",but an blank object which extend some own methods that is just the same as "dojo/_base/fx::Animation".Why we don't use the same solution(return an exactly Animation object),in turn to user this solution? I have add a line of code behind the 194 line of fx.js( dojo1.9.2 sourcecode)

_chain.prototype = new Evented();

And then I can bind processor function to "onEnd" now. Is this a bug,or for other reason.

Change History (4)

comment:1 Changed 7 years ago by marvin

Got the same problem with dojo version 1.10.

comment:2 Changed 7 years ago by dylan

Milestone: tbd1.11
Owner: set to dylan
Priority: undecidedhigh
Status: newassigned

comment:3 Changed 6 years ago by dylan

Milestone: 1.111.12

comment:4 Changed 6 years ago by dylan

Resolution: patchwelcome
Status: assignedclosed

Given that no one has shown interest in creating a patch in more than a year, I'm closing this as patchwelcome. Please let us know if you would like to get involved in helping make this change to Dojo!

Note: See TracTickets for help on using tickets.