Skip to content

Commit

Permalink
replace params playingProperty and enabledProperty with StepButton op…
Browse files Browse the repository at this point in the history
…tions.playingProperty, phetsims/scenery-phet#243
  • Loading branch information
pixelzoom committed Jul 6, 2016
1 parent 4915f44 commit a442d25
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
3 changes: 2 additions & 1 deletion js/atomic-interactions/view/AtomicInteractionsScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ define( function( require ) {
this.addChild( resetAllButton );

// add play/pause and step buttons
var stepButton = new StepForwardButton( dualAtomModel.isPlayingProperty, {
var stepButton = new StepForwardButton( {
playingProperty: dualAtomModel.isPlayingProperty,
listener: function() { dualAtomModel.stepInternal( 0.016 ); },
radius: 12,
stroke: 'black',
Expand Down
3 changes: 2 additions & 1 deletion js/phase-changes/view/PhaseChangesScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ define( function( require ) {
} );

// add play pause button and step button
var stepButton = new StepForwardButton( multipleParticleModel.isPlayingProperty, {
var stepButton = new StepForwardButton( {
playingProperty: multipleParticleModel.isPlayingProperty,
listener: function() { multipleParticleModel.stepInternal( 0.016 ); },
radius: 12,
stroke: 'black',
Expand Down
16 changes: 8 additions & 8 deletions js/states/view/StatesScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@ define( function( require ) {
} );

// add play pause button and step button
var stepButton = new StepForwardButton( multipleParticleModel.isPlayingProperty, {
listener: function() { multipleParticleModel.stepInternal( 0.016 ); },
var stepButton = new StepForwardButton( {
playingProperty: multipleParticleModel.isPlayingProperty,
listener: function() { multipleParticleModel.stepInternal( 0.016 ); },
radius: 12,
stroke: 'black',
fill: '#005566',
right: heaterCoolerNode.left - stepButtonXOffset,
bottom: heaterCoolerNode.bottom - stepButtonYOffset
}
);
stroke: 'black',
fill: '#005566',
right: heaterCoolerNode.left - stepButtonXOffset,
bottom: heaterCoolerNode.bottom - stepButtonYOffset
} );

this.addChild( stepButton );
multipleParticleModel.moleculeTypeProperty.link( function() {
Expand Down

0 comments on commit a442d25

Please sign in to comment.