Skip to content

Commit

Permalink
add checkboxOptions to VerticalCheckboxGroup, #344
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Malley <cmalley@pixelzoom.com>
  • Loading branch information
pixelzoom committed Aug 15, 2018
1 parent dbf549e commit 3956ff7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions js/VerticalAquaRadioButtonGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ define( function( require ) {

options = _.extend( {

// options passed to constructor of the AquaRadioButtons
radioButtonOptions: {},
// {Object|null} options passed to constructor of the AquaRadioButtons
radioButtonOptions: null,

// dilation of pointer areas for each radio button, y dimension is computed
touchAreaXDilation: 0,
Expand Down
13 changes: 5 additions & 8 deletions js/VerticalCheckboxGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,16 @@ define( function( require ) {

options = _.extend( {

// {Object|null} options passed to constructor of the Checkbox
checkboxOptions: null,

// dilation of pointer areas, y dimension is computed
touchAreaXDilation: 5,
mouseAreaXDilation: 5,

//TODO #344 this is the total of left and right margins, replace with xMargin?
padding: 8,

//TODO #344 these are passed to Checkbox, replace with checkboxOptions: {...}
boxWidth: 21,
checkboxColor: 'black',

// supertype options
spacing: 10, // vertical spacing
align: 'left',
Expand Down Expand Up @@ -72,11 +71,9 @@ define( function( require ) {
children: [ new HStrut( maxWidth + options.padding - indent ), item.node ]
} );

var checkbox = new Checkbox( content, item.property, {
checkboxColor: options.checkboxColor,
boxWidth: options.boxWidth,
var checkbox = new Checkbox( content, item.property, _.extend( {}, options.checkboxOptions, {
tandem: item.tandem || Tandem.optional
} );
} ) );

// set pointer areas, y dimensions are computed
var yDilation = options.spacing / 2;
Expand Down

0 comments on commit 3956ff7

Please sign in to comment.