Skip to content

Commit

Permalink
StepBackButton, StepForwardButton: remove stepFunction param, use opt…
Browse files Browse the repository at this point in the history
…ions.listener, phetsims/scenery-phet#243
  • Loading branch information
pixelzoom committed Jul 6, 2016
1 parent 1c86808 commit 3c9a56b
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions js/neuron/view/NeuronScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,18 +222,14 @@ define( function( require ) {
}
);

var stepBackwardButton = new StepBackButton(
function() {
neuronClockModelAdapter.stepClockBackWhilePaused();
},
stepBackEnabledProperty
);
var stepBackwardButton = new StepBackButton( stepBackEnabledProperty, {
listener: function() { neuronClockModelAdapter.stepClockBackWhilePaused(); }
} );

// step forward is enabled whenever paused.
var stepForwardButton = new StepForwardButton(
function() { neuronClockModelAdapter.stepClockWhilePaused(); },
playingProperty
);
var stepForwardButton = new StepForwardButton( playingProperty, {
listener: function() { neuronClockModelAdapter.stepClockWhilePaused(); }
} );

recordPlayButtons.push( stepBackwardButton );
recordPlayButtons.push( playPauseButton );
Expand Down

0 comments on commit 3c9a56b

Please sign in to comment.