phetsims / curve-fitting

"Curve Fitting" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
6 stars 3 forks source link

Events are deprecated. Use Emitted instead. #79

Closed veillette closed 8 years ago

veillette commented 8 years ago

While reviewing Plinko-Probability, @jessegreenberg mentionned

Events.js has been marked as deprecated and should be replaced with Emitter.js. Rather than extend Emitter, Ball and Histogram should extend something else, and an Emitter should be create for each type of event that needs to be emitted.

For example, you could create an exitedEmitter, and then replace calls to trigger0 with exitedEmitter.emit().

expression-exchange has some nice emitter examples if you wish to look at them.'

Curve-fitting is using Events

veillette commented 8 years ago

Events were replaced by emitters. Forgot to tag the commit though. Closing