Skip to content

Commit

Permalink
Emitter validation changes for phetsims/axon#227
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson authored and chrisklus committed Jun 2, 2021
1 parent 07987d4 commit df200d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions js/make-a-ten/common/model/PaperNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ define( function( require ) {
this.baseNumbers = PaperNumber.getBaseNumbers( this.numberValueProperty.value );

// @public {Emitter} - Fires when the user stops dragging a paper number.
this.endDragEmitter = new Emitter( { validationEnabled: false } );
this.endDragEmitter = new Emitter( { validators: [ { valueType: PaperNumber } ] } );

// @public {Emitter} - Fires when the animation towards our destination ends (we hit our destination).
this.endAnimationEmitter = new Emitter( { validationEnabled: false } );
this.endAnimationEmitter = new Emitter( { validators: [ { valueType: PaperNumber } ] } );
}

makeATen.register( 'PaperNumber', PaperNumber );
Expand Down
6 changes: 3 additions & 3 deletions js/make-a-ten/common/view/PaperNumberNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ define( function( require ) {
this.paperNumber = paperNumber;

// @public {Emitter} - Triggered with self when this paper number node starts to get dragged
this.moveEmitter = new Emitter( { validationEnabled: false } );
this.moveEmitter = new Emitter( { validators: [ { valueType: PaperNumberNode } ] } );

// @public {Emitter} - Triggered with self when this paper number node is split
this.splitEmitter = new Emitter( { validationEnabled: false } );
this.splitEmitter = new Emitter( { validators: [ { valueType: PaperNumberNode } ] } );

// @public {Emitter} - Triggered when user interaction with this paper number begins.
this.interactionStartedEmitter = new Emitter( { validationEnabled: false } );
this.interactionStartedEmitter = new Emitter( { validators: [ { valueType: PaperNumberNode } ] } );

// @private {boolean} - When true, don't emit from the moveEmitter (synthetic drag)
this.preventMoveEmit = false;
Expand Down

0 comments on commit df200d1

Please sign in to comment.