From 984b9d9bcddf1300b38ddb943aacd156b2d0b686 Mon Sep 17 00:00:00 2001 From: mbarlow12 Date: Wed, 30 Jan 2019 16:35:48 -0700 Subject: [PATCH] nested NumberControl options, see phetsims/scenery-phet#451 --- js/gravity-force-lab/view/MassControl.js | 37 +++++++++++++----------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/js/gravity-force-lab/view/MassControl.js b/js/gravity-force-lab/view/MassControl.js index 39c1335c..7e632f74 100644 --- a/js/gravity-force-lab/view/MassControl.js +++ b/js/gravity-force-lab/view/MassControl.js @@ -47,24 +47,27 @@ define( function( require ) { yMargin: 10, numberControlOptions: { + sliderOptions: { + thumbSize: THUMB_SIZE, + trackSize: TRACK_SIZE, + majorTickLength: ( THUMB_SIZE.height / 2 ) + ( TRACK_SIZE.height / 2 ) + 2, + minorTickSpacing: 0, + thumbFillEnabled: thumbColor.colorUtilsBrighter( 0.15 ), + thumbFillHighlighted: thumbColor.colorUtilsBrighter( 0.35 ), - thumbSize: THUMB_SIZE, - trackSize: TRACK_SIZE, - titleFont: new PhetFont( 24 ), - valueFont: new PhetFont( 18 ), - valueXMargin: 20, - valueYMargin: 4, - majorTickLength: ( THUMB_SIZE.height / 2 ) + ( TRACK_SIZE.height / 2 ) + 2, - minorTickSpacing: 0, - thumbFillEnabled: thumbColor.colorUtilsBrighter( 0.15 ), - thumbFillHighlighted: thumbColor.colorUtilsBrighter( 0.35 ), - - // a11y - keyboardStep: 50, - pageKeyboardStep: 100, - accessibleName: titleString, - // accessibleValuePattern: valueKilogramsPatternString, // {{value}} kilograms - createAriaValueText: massDescriber.getAriaValueTextCreator( massEnum ) + // a11y + keyboardStep: 50, + pageKeyboardStep: 100, + accessibleName: titleString, + // accessibleValuePattern: valueKilogramsPatternString, // {{value}} kilograms + createAriaValueText: massDescriber.getAriaValueTextCreator( massEnum ) + }, + titleNodeOptions: { font: new PhetFont( 24 ) }, + numberDisplayOptions: { + font: new PhetFont( 18 ), + xMargin: 20, + yMargin: 4 + } },