From e330bfea428e04c92e1f7f6514d5f14b0e0ae098 Mon Sep 17 00:00:00 2001 From: Sam Reid Date: Wed, 15 Mar 2023 13:06:42 -0600 Subject: [PATCH] Rename MAX_WIDTH to TEXT_MAX_WIDTH and document, see https://github.com/phetsims/my-solar-system/issues/95 --- js/SolarSystemCommonConstants.ts | 4 ++-- js/view/BodyNode.ts | 2 +- js/view/createArrowsVisibilityCheckboxes.ts | 2 +- js/view/createVisibilityInformationCheckboxes.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/SolarSystemCommonConstants.ts b/js/SolarSystemCommonConstants.ts index 2daddf1..f88533b 100644 --- a/js/SolarSystemCommonConstants.ts +++ b/js/SolarSystemCommonConstants.ts @@ -16,8 +16,8 @@ const SolarSystemCommonConstants = { SCREEN_VIEW_X_MARGIN: 15, SCREEN_VIEW_Y_MARGIN: 15, - //REVIEW: maximum width for.... what? Should be documented, and possibly renamed to something more informative - MAX_WIDTH: 200, + // Max width for many of the text labels + TEXT_MAX_WIDTH: 200, CONTROL_PANEL_OPTIONS: { stroke: null, diff --git a/js/view/BodyNode.ts b/js/view/BodyNode.ts index b366f17..fa62e7b 100644 --- a/js/view/BodyNode.ts +++ b/js/view/BodyNode.ts @@ -82,7 +82,7 @@ export default class BodyNode extends ShadedSphereNode { textOptions: { fill: 'white', // Not a colorProperty because it is not dynamic - maxWidth: SolarSystemCommonConstants.MAX_WIDTH, + maxWidth: SolarSystemCommonConstants.TEXT_MAX_WIDTH, font: new PhetFont( 16 ) }, diff --git a/js/view/createArrowsVisibilityCheckboxes.ts b/js/view/createArrowsVisibilityCheckboxes.ts index d2ca159..c8f8e07 100644 --- a/js/view/createArrowsVisibilityCheckboxes.ts +++ b/js/view/createArrowsVisibilityCheckboxes.ts @@ -22,7 +22,7 @@ import solarSystemCommon from '../solarSystemCommon.js'; const ARROW_Y_COORDINATE = -10; const TEXT_OPTIONS = combineOptions( { - maxWidth: SolarSystemCommonConstants.MAX_WIDTH + maxWidth: SolarSystemCommonConstants.TEXT_MAX_WIDTH }, SolarSystemCommonConstants.TEXT_OPTIONS ); const SPACING = 10; diff --git a/js/view/createVisibilityInformationCheckboxes.ts b/js/view/createVisibilityInformationCheckboxes.ts index a023eb2..0d2ac59 100644 --- a/js/view/createVisibilityInformationCheckboxes.ts +++ b/js/view/createVisibilityInformationCheckboxes.ts @@ -25,7 +25,7 @@ import pathIconProjector_png from '../../images/pathIconProjector_png.js'; // constants const TEXT_OPTIONS = combineOptions( { - maxWidth: SolarSystemCommonConstants.MAX_WIDTH + maxWidth: SolarSystemCommonConstants.TEXT_MAX_WIDTH }, SolarSystemCommonConstants.TEXT_OPTIONS ); const createVisibilityInformationCheckboxes = ( model: SolarSystemCommonModel, tandem: Tandem ): SolarSystemCommonCheckbox[] => {