Skip to content

Commit

Permalink
Rename MAX_WIDTH to TEXT_MAX_WIDTH and document, see phetsims/my-sola…
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Mar 15, 2023
1 parent 5a22788 commit e330bfe
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions js/SolarSystemCommonConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion js/view/BodyNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
},

Expand Down
2 changes: 1 addition & 1 deletion js/view/createArrowsVisibilityCheckboxes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import solarSystemCommon from '../solarSystemCommon.js';
const ARROW_Y_COORDINATE = -10;

const TEXT_OPTIONS = combineOptions<TextOptions>( {
maxWidth: SolarSystemCommonConstants.MAX_WIDTH
maxWidth: SolarSystemCommonConstants.TEXT_MAX_WIDTH
}, SolarSystemCommonConstants.TEXT_OPTIONS );

const SPACING = 10;
Expand Down
2 changes: 1 addition & 1 deletion js/view/createVisibilityInformationCheckboxes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import pathIconProjector_png from '../../images/pathIconProjector_png.js';

// constants
const TEXT_OPTIONS = combineOptions<TextOptions>( {
maxWidth: SolarSystemCommonConstants.MAX_WIDTH
maxWidth: SolarSystemCommonConstants.TEXT_MAX_WIDTH
}, SolarSystemCommonConstants.TEXT_OPTIONS );

const createVisibilityInformationCheckboxes = ( model: SolarSystemCommonModel, tandem: Tandem ): SolarSystemCommonCheckbox[] => {
Expand Down

0 comments on commit e330bfe

Please sign in to comment.