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 2242993 commit 2eeedcf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions js/common/model/EqualityExplorerMovable.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ define( function( require ) {

// @public (read-only) emit1 when dispose has completed.
// Callback signature is function( {Term} term ), where the parameter is the term that was disposed.
this.disposedEmitter = new Emitter();
this.disposedEmitter = new Emitter( { validationEnabled: false } );

// @public (read-only) has dispose completed?
this.isDisposed = false;
Expand Down Expand Up @@ -90,7 +90,7 @@ define( function( require ) {

// Do this last, sequence is important!
this.isDisposed = true;
this.disposedEmitter.emit1( this );
this.disposedEmitter.emit( this );
this.disposedEmitter.dispose();
},

Expand Down
10 changes: 5 additions & 5 deletions js/operations/model/OperationsScene.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ define( function( require ) {
options.variables = [ this.xVariable ];

// @public (read-only)
// emit1( {TermCreator[]} ) when one or more terms become zero as the result of a universal operation
this.sumToZeroEmitter = new Emitter();
// emit( {TermCreator[]} ) when one or more terms become zero as the result of a universal operation
this.sumToZeroEmitter = new Emitter( { validationEnabled: false } );

// @public (read-only)
this.operators = EqualityExplorerConstants.OPERATORS;
Expand Down Expand Up @@ -118,7 +118,7 @@ define( function( require ) {

// @protected (read-only) emit1 is called when a universal operation has completed.
// Callback signature is function( {UniversalOperation} operation )
this.operationCompletedEmitter = new Emitter();
this.operationCompletedEmitter = new Emitter( { validationEnabled: false } );

// Variable and constant terms will combined in specific cells in the plate's grid.
var variableTermCreatorOptions = {
Expand Down Expand Up @@ -203,11 +203,11 @@ define( function( require ) {
// appear in the cells at the scale's final position, not at the position before the
// operation was applied, or at some intermediate location as the operation is being applied.
if ( termCreatorsZero.length > 0 ) {
this.sumToZeroEmitter.emit1( termCreatorsZero );
this.sumToZeroEmitter.emit( termCreatorsZero );
}

// notify listeners that the operation successfully completed
this.operationCompletedEmitter.emit1( operation );
this.operationCompletedEmitter.emit( operation );
}
},

Expand Down

0 comments on commit 2eeedcf

Please sign in to comment.