Skip to content

Commit

Permalink
Converting dot Utils usage, see phetsims/dot#4
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Feb 14, 2025
1 parent 41c3ccc commit 5733874
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions js/ScoreDisplayLabeledNumber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import DerivedProperty from '../../axon/js/DerivedProperty.js';
import TReadOnlyProperty from '../../axon/js/TReadOnlyProperty.js';
import Utils from '../../dot/js/Utils.js';
import optionize from '../../phet-core/js/optionize.js';
import StrictOmit from '../../phet-core/js/types/StrictOmit.js';
import StringUtils from '../../phetcommon/js/util/StringUtils.js';
Expand All @@ -21,6 +20,7 @@ import Font from '../../scenery/js/util/Font.js';
import TColor from '../../scenery/js/util/TColor.js';
import vegas from './vegas.js';
import VegasStrings from './VegasStrings.js';
import { toFixed } from '../../dot/js/util/toFixed.js';

type SelfOptions = {
font?: Font;
Expand All @@ -47,7 +47,7 @@ export default class ScoreDisplayLabeledNumber extends Node {
const scoreDisplayStringProperty = new DerivedProperty(
[ VegasStrings.pattern.score.numberStringProperty, scoreProperty ],
( pattern: string, score: number ) => StringUtils.fillIn( pattern, {
score: Utils.toFixed( score, options.scoreDecimalPlaces )
score: toFixed( score, options.scoreDecimalPlaces )
} )
);

Expand Down
4 changes: 2 additions & 2 deletions js/ScoreDisplayNumberAndStar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/

import TReadOnlyProperty from '../../axon/js/TReadOnlyProperty.js';
import Utils from '../../dot/js/Utils.js';
import optionize, { combineOptions } from '../../phet-core/js/optionize.js';
import StrictOmit from '../../phet-core/js/types/StrictOmit.js';
import StarNode, { StarNodeOptions } from '../../scenery-phet/js/StarNode.js';
Expand All @@ -19,6 +18,7 @@ import Text from '../../scenery/js/nodes/Text.js';
import Font from '../../scenery/js/util/Font.js';
import TColor from '../../scenery/js/util/TColor.js';
import vegas from './vegas.js';
import { toFixed } from '../../dot/js/util/toFixed.js';

type SelfOptions = {
font?: Font;
Expand Down Expand Up @@ -64,7 +64,7 @@ export default class ScoreDisplayNumberAndStar extends HBox {
children.push( new StarNode( combineOptions<StarNodeOptions>( { value: 0 }, options.starNodeOptions ) ) );
}
else {
children.push( new Text( Utils.toFixed( score, options.scoreDecimalPlaces ), {
children.push( new Text( toFixed( score, options.scoreDecimalPlaces ), {
font: options.font,
fill: options.textFill
} ) );
Expand Down

0 comments on commit 5733874

Please sign in to comment.