Skip to content

Commit

Permalink
add a comment for Text that is intentionally not instrumented, #314
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Jan 30, 2023
1 parent a9c838b commit 8ddaa0a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
16 changes: 14 additions & 2 deletions js/beerslaw/view/ConcentrationControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,20 @@ class SoluteConcentrationControl extends NumberControl {
// ticks at the min and max of the solution's concentration range
assert && assert( !options.sliderOptions.majorTicks, 'ConcentrationControl sets majorTicks' );
options.sliderOptions.majorTicks = [
{ value: numberRange.min, label: new Text( numberRange.min, { font: TICK_FONT } ) },
{ value: numberRange.max, label: new Text( numberRange.max, { font: TICK_FONT } ) }
{
value: numberRange.min,
label: new Text( numberRange.min, {
font: TICK_FONT
// No PhET-iO instrumentation is desired.
} )
},
{
value: numberRange.max,
label: new Text( numberRange.max, {
font: TICK_FONT
// No PhET-iO instrumentation is desired.
} )
}
];

super( labelStringProperty, numberProperty, numberRange, options );
Expand Down
1 change: 1 addition & 0 deletions js/concentration/view/BeakerNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export default class BeakerNode extends Node {
x: rightX + TICK_LABEL_X_SPACING,
centerY: tickPath.centerY,
maxWidth: 0.25 * beaker.size.width // constrain width for i18n
// No PhET-iO instrumentation is desired.
} ) );
}
}
Expand Down
5 changes: 4 additions & 1 deletion js/concentration/view/SaturatedIndicator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ export default class SaturatedIndicator extends Node {

super();

const labelText = new Text( BeersLawLabStrings.saturatedStringProperty, { font: new PhetFont( 20 ), maxWidth: 400 } );
const labelText = new Text( BeersLawLabStrings.saturatedStringProperty, {
font: new PhetFont( 20 ),
maxWidth: 400
} );

// translucent light-gray background, so this shows up on all solution colors.
const backgroundNode = new BackgroundNode( labelText, {
Expand Down

0 comments on commit 8ddaa0a

Please sign in to comment.