Skip to content

Commit

Permalink
Generalized ToggleNode to handle an arbitrary number of values, see p…
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed May 14, 2018
1 parent 6be04c6 commit fa6c912
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/netforce/view/GoPauseButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ define( function( require ) {
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
var RoundPushButton = require( 'SUN/buttons/RoundPushButton' );
var Text = require( 'SCENERY/nodes/Text' );
var ToggleNode = require( 'SUN/ToggleNode' );
var BooleanToggleNode = require( 'SUN/BooleanToggleNode' );

// phet-io modules
var NumberIO = require( 'ifphetio!PHET_IO/types/NumberIO' );
Expand Down Expand Up @@ -132,7 +132,7 @@ define( function( require ) {
} );//red

var showGoButtonProperty = new DerivedProperty( [ model.runningProperty ], function( running ) { return !running; } );
ToggleNode.call( this, goButton, pauseButton, showGoButtonProperty, options );
BooleanToggleNode.call( this, goButton, pauseButton, showGoButtonProperty, options );

//Show the go/pause button if any pullers are attached or if the cart got started moving, and if it hasn't already finished a match, see #61
Property.multilink( [ model.runningProperty, model.stateProperty, model.numberPullersAttachedProperty ], function() {
Expand All @@ -146,5 +146,5 @@ define( function( require ) {

forcesAndMotionBasics.register( 'GoPauseButton', GoPauseButton );

return inherit( ToggleNode, GoPauseButton );
return inherit( BooleanToggleNode, GoPauseButton );
} );

0 comments on commit fa6c912

Please sign in to comment.