Skip to content

Commit

Permalink
implement nested options, see phetsims/coulombs-law#89
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarlow12 committed Dec 20, 2018
1 parent b426caa commit 4748100
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions js/view/ISLCObjectControlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ define( function( require ) {
// a11y
tagName: 'li',

numberControlOptions: {},
numberControlOptions: null,
tickLabelOptions: {},

tandem: Tandem.required
Expand All @@ -73,7 +73,6 @@ define( function( require ) {
layoutFunction: NumberControl.createLayoutFunction3( { xSpacing: 10 } ),
minorTickSpacing: 2,
minorTickLength: 6,
arrowButtonScale: 1,
trackFillEnabled: 'black',
thumbSize: THUMB_SIZE,

Expand Down Expand Up @@ -109,6 +108,12 @@ define( function( require ) {
onFocus: function( event ) {}
}, options.numberControlOptions );

options.numberControlOptions.arrowButtonOptions = _.extend( {
touchAreaXDilation: 15,
touchAreaYDilation: 15,
scale: 1
}, options.numberControlOptions.arrowButtonOptions );

for ( var i = 0; i < options.numberControlOptions.additionalTicks.length; i++ ) {
var tick = {
value: options.numberControlOptions.additionalTicks[ i ].value,
Expand Down

0 comments on commit 4748100

Please sign in to comment.