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 8a202bf commit 3f16640
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/PatternStringProperty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
* @author Jonathan Olson <[email protected]>
*/

import Utils from '../../dot/js/Utils.js';
import optionize from '../../phet-core/js/optionize.js';
import type IntentionalAny from '../../phet-core/js/types/IntentionalAny.js';
import type KeysMatching from '../../phet-core/js/types/KeysMatching.js';
Expand All @@ -64,6 +63,7 @@ import DerivedStringProperty, { type DerivedStringPropertyOptions } from './Deri
import type TCollapsePropertyValue from './TCollapsePropertyValue.js';
import type TReadOnlyProperty from './TReadOnlyProperty.js';
import { isTReadOnlyProperty } from './TReadOnlyProperty.js';
import { toFixed } from '../../dot/js/util/toFixed.js';

// The type of allowed values for a PatternStringProperty
type ValuesType = Record<string, IntentionalAny>;
Expand Down Expand Up @@ -199,7 +199,7 @@ export default class PatternStringProperty<Values extends ValuesType> extends De
: options.decimalPlaces[ key ]!;
assert && assert( decimalPlaces !== null );

stringNumberMap = ( value: string | number ) => stringify( typeof value === 'number' ? Utils.toFixed( value, decimalPlaces ) : value );
stringNumberMap = ( value: string | number ) => stringify( typeof value === 'number' ? toFixed( value, decimalPlaces ) : value );
}

// If we are applying a map, "prepend" that map before the others, so that if it returns a number, we can
Expand Down

0 comments on commit 3f16640

Please sign in to comment.