Skip to content

Commit

Permalink
remove emit1(), use emit() instead, phetsims/axon#211
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Feb 27, 2019
1 parent fecb3e5 commit ca1282b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/common/model/Pendulum.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ define( function( require ) {
this.frictionProperty = frictionProperty;

// @public
this.stepEmitter = new Emitter();
this.stepEmitter = new Emitter( { validationEnabled: false } );
this.userMovedEmitter = new Emitter();
this.crossingEmitter = new Emitter( { validationEnabled: false } );
this.peakEmitter = new Emitter();
this.peakEmitter = new Emitter( { validationEnabled: false } );
this.resetEmitter = new Emitter();

// default color for this pendulum
Expand Down Expand Up @@ -240,7 +240,7 @@ define( function( require ) {
// update the derived variables, taking into account the transfer to thermal energy if friction is present
this.updateDerivedVariables( this.frictionProperty.value > 0 );

this.stepEmitter.emit1( dt );
this.stepEmitter.emit( dt );
},

/**
Expand Down Expand Up @@ -274,7 +274,7 @@ define( function( require ) {
peak: function( oldTheta, newTheta ) {
// a slightly better estimate is turningAngle = ( oldTheta + newTheta ) / 2 + (dt/2)*(oldOmega^2+newOmega^2)/(oldOmega-newOmega)
var turningAngle = ( oldTheta + newTheta > 0 ) ? Math.max( oldTheta, newTheta ) : Math.min( oldTheta, newTheta );
this.peakEmitter.emit1( turningAngle );
this.peakEmitter.emit( turningAngle );
},

/**
Expand Down

0 comments on commit ca1282b

Please sign in to comment.