From 35a257b7d07a9c8f19cc76e7e3a111c6987b6fe9 Mon Sep 17 00:00:00 2001 From: Sam Reid Date: Thu, 9 Mar 2023 21:44:53 -0700 Subject: [PATCH] Inline COMBO_BOX_TEXT_OPTIONS in MySolarSystemComboBox, see https://github.com/phetsims/my-solar-system/issues/88 --- js/common/view/MySolarSystemComboBox.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/js/common/view/MySolarSystemComboBox.ts b/js/common/view/MySolarSystemComboBox.ts index 086cd8a3..b55ca8a2 100644 --- a/js/common/view/MySolarSystemComboBox.ts +++ b/js/common/view/MySolarSystemComboBox.ts @@ -18,12 +18,6 @@ import MySolarSystemStrings from '../../MySolarSystemStrings.js'; import MySolarSystemModel from '../model/MySolarSystemModel.js'; import { Node, Text } from '../../../../scenery/js/imports.js'; -//REVIEW: This is only used once, why not inline it? -const COMBO_BOX_TEXT_OPTIONS = { - font: SolarSystemCommonConstants.PANEL_FONT, - maxWidth: SolarSystemCommonConstants.MAX_WIDTH -}; - export default class MySolarSystemComboBox extends ComboBox { public constructor( model: MySolarSystemModel, listParent: Node ) { @@ -76,7 +70,10 @@ export default class MySolarSystemComboBox extends ComboBox { const nameProperty = modeNameMap.get( mode )!; return { value: mode, - createNode: () => new Text( nameProperty, COMBO_BOX_TEXT_OPTIONS ), + createNode: () => new Text( nameProperty, { + font: SolarSystemCommonConstants.PANEL_FONT, + maxWidth: SolarSystemCommonConstants.MAX_WIDTH + } ), a11yName: nameProperty }; };