Skip to content

Commit

Permalink
add maxBalls query parameter for testing dialog, #72
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Aug 30, 2016
1 parent 0ceac3b commit 3abd4a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions js/common/PlinkoProbabilityQueryParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ define( function( require ) {

var PlinkoProbabilityQueryParameters = {

// maximum number of balls that can be in any 1 bin in the Lab screen, e.g. maxBalls=10
MAX_BALLS: getQueryParameter( 'maxBalls' ) && parseInt( getQueryParameter( 'maxBalls' ) ),

// number of balls to put in the histogram at startup, e.g. populateHistogram=20
POPULATE_HISTOGRAM: getQueryParameter( 'populateHistogram' ) && parseInt( getQueryParameter( 'populateHistogram' ) )
};
Expand Down
3 changes: 2 additions & 1 deletion js/lab/model/LabModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ define( function( require ) {
var inherit = require( 'PHET_CORE/inherit' );
var plinkoProbability = require( 'PLINKO_PROBABILITY/plinkoProbability' );
var PlinkoProbabilityCommonModel = require( 'PLINKO_PROBABILITY/common/model/PlinkoProbabilityCommonModel' );
var PlinkoProbabilityQueryParameters = require( 'PLINKO_PROBABILITY/common/PlinkoProbabilityQueryParameters' );

// constants
var MAX_NUMBER_BALLS = 9999; // max number of balls per bin
var MAX_NUMBER_BALLS = PlinkoProbabilityQueryParameters.MAX_BALLS || 9999; // max number of balls per bin

/**
* @constructor
Expand Down

0 comments on commit 3abd4a9

Please sign in to comment.