Skip to content

Commit

Permalink
Use phetioType option, see phetsims/scenery#603
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Feb 8, 2017
1 parent d4da484 commit c99c646
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions js/FaucetNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,10 @@ define( function( require ) {
tapToDispenseInterval: 500, // tap-to-dispense feature: amount of time that fluid is dispensed, in milliseconds
closeOnRelease: true, // when the shooter is released, close the faucet
interactiveProperty: new Property( true ), // when the faucet is interactive, the flow rate control is visible, see issue #67
tandem: Tandem.tandemRequired()
tandem: Tandem.tandemRequired(),
phetioType: TFaucet
}, options );

var tandem = options.tandem;
options.tandem = options.tandem.createSupertypeTandem();

assert && assert( ( 1000 * options.tapToDispenseAmount / options.tapToDispenseInterval ) <= maxFlowRate );

var self = this;
Expand Down Expand Up @@ -295,9 +293,6 @@ define( function( require ) {

self.mutate( options );

// Tandem support
tandem.addInstance( this, TFaucet );

// @private called by dispose
this.disposeFaucetNode = function() {

Expand All @@ -308,9 +303,6 @@ define( function( require ) {

// Subcomponents
shooterNode.dispose();

// tandem
tandem.removeInstance( self );
};
}

Expand Down

0 comments on commit c99c646

Please sign in to comment.