diff --git a/js/common/FMWConstants.ts b/js/common/FMWConstants.ts index 5d721af2..dd3e35e0 100644 --- a/js/common/FMWConstants.ts +++ b/js/common/FMWConstants.ts @@ -19,6 +19,7 @@ import PhetFont from '../../../scenery-phet/js/PhetFont.js'; import { Node, VBox } from '../../../scenery/js/imports.js'; import fourierMakingWaves from '../fourierMakingWaves.js'; import FMWColors from './FMWColors.js'; +import Tandem from '../../../tandem/js/Tandem.js'; // constants - view const PANEL_CORNER_RADIUS = 5; @@ -153,7 +154,11 @@ const FMWConstants = { X_AXIS_LABEL_MAX_WIDTH: 38, X_AXIS_LABEL_SPACING: 6, // horizontal space between chart rectangle and x-axis label Y_AXIS_LABEL_SPACING: 36, // horizontal space between chart rectangle and y-axis label - SECONDARY_WAVEFORM_LINE_WIDTH: 4 + SECONDARY_WAVEFORM_LINE_WIDTH: 4, + + // Tandems + //TODO https://github.com/phetsims/tandem/issues/298 + DERIVED_STRINGS_TANDEM: Tandem.GENERAL_MODEL.createTandem( 'strings' ).createTandem( 'fourierMakingWaves' ).createTandem( 'derivedStrings' ) }; // Verify some of the above constants diff --git a/js/common/FMWDerivedStrings.ts b/js/common/FMWDerivedStrings.ts index 20d3c698..3efa084e 100644 --- a/js/common/FMWDerivedStrings.ts +++ b/js/common/FMWDerivedStrings.ts @@ -7,138 +7,137 @@ */ import fourierMakingWaves from '../fourierMakingWaves.js'; -import Tandem from '../../../tandem/js/Tandem.js'; import FMWSymbols from './FMWSymbols.js'; import PatternStringProperty from '../../../axon/js/PatternStringProperty.js'; import FourierMakingWavesStrings from '../FourierMakingWavesStrings.js'; import StringProperty from '../../../axon/js/StringProperty.js'; +import FMWConstants from './FMWConstants.js'; -//TODO https://github.com/phetsims/tandem/issues/298 -const DERIVED_STRINGS_TANDEM = Tandem.GENERAL_MODEL.createTandem( 'strings' ).createTandem( 'fourierMakingWaves' ).createTandem( 'derivedStrings' ) +const DERIVED_STRINGS_TANDEM = FMWConstants.DERIVED_STRINGS_TANDEM; const FMWDerivedStrings = { k1StringProperty: new PatternStringProperty( new StringProperty( '{{k}}1' ), { - k: FMWSymbols.kSymbolProperty + k: FMWSymbols.kMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'k1StringProperty' ) } ), omega1StringProperty: new PatternStringProperty( new StringProperty( '{{omega}}1' ), { - omega: FMWSymbols.omegaSymbolProperty + omega: FMWSymbols.omegaMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'omega1StringProperty' ) } ), xMetersStringProperty: new PatternStringProperty( FourierMakingWavesStrings.symbolUnitsStringProperty, { - symbol: FMWSymbols.xSymbolProperty, + symbol: FMWSymbols.xMarkupStringProperty, units: FourierMakingWavesStrings.units.metersStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'xMetersStringProperty' ) } ), xMillisecondsStringProperty: new PatternStringProperty( FourierMakingWavesStrings.symbolUnitsStringProperty, { - symbol: FMWSymbols.tSymbolProperty, + symbol: FMWSymbols.tMarkupStringProperty, units: FourierMakingWavesStrings.units.millisecondsStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'xMillisecondsStringProperty' ) } ), spaceXStringProperty: new PatternStringProperty( FourierMakingWavesStrings.spaceSymbolStringProperty, { - symbol: FMWSymbols.xSymbolProperty + symbol: FMWSymbols.xMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'spaceXStringProperty' ) } ), timeTStringProperty: new PatternStringProperty( FourierMakingWavesStrings.timeSymbolStringProperty, { - symbol: FMWSymbols.tSymbolProperty + symbol: FMWSymbols.tMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'timeTStringProperty' ) } ), spaceAndTimeXTStringProperty: new PatternStringProperty( FourierMakingWavesStrings.spaceAndTimeSymbolsStringProperty, { - spaceSymbol: FMWSymbols.xSymbolProperty, - timeSymbol: FMWSymbols.tSymbolProperty + spaceSymbol: FMWSymbols.xMarkupStringProperty, + timeSymbol: FMWSymbols.tMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'spaceAndTimeXTStringProperty' ) } ), lambdaAndTStringProperty: new PatternStringProperty( FourierMakingWavesStrings.symbolAndSymbolStringProperty, { - symbol1: FMWSymbols.lambdaSymbolProperty, - symbol2: FMWSymbols.TSymbolProperty + symbol1: FMWSymbols.lambdaMarkupStringProperty, + symbol2: FMWSymbols.TMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'lambdaAndTStringProperty' ) } ), kAndOmegaStringProperty: new PatternStringProperty( FourierMakingWavesStrings.symbolAndSymbolStringProperty, { - symbol1: FMWSymbols.kSymbolProperty, - symbol2: FMWSymbols.omegaSymbolProperty + symbol1: FMWSymbols.kMarkupStringProperty, + symbol2: FMWSymbols.omegaMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'kAndOmegaStringProperty' ) } ), ADescriptionStringProperty: new PatternStringProperty( FourierMakingWavesStrings.symbolsDialog.AStringProperty, { - A: FMWSymbols.ASymbolProperty + A: FMWSymbols.AMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'ADescriptionStringProperty' ) } ), fDescriptionStringProperty: new PatternStringProperty( FourierMakingWavesStrings.symbolsDialog.fStringProperty, { - f: FMWSymbols.fSymbolProperty + f: FMWSymbols.fMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'fDescriptionStringProperty' ) } ), lambdaDescriptionStringProperty: new PatternStringProperty( FourierMakingWavesStrings.symbolsDialog.lambdaStringProperty, { - lambda: FMWSymbols.lambdaSymbolProperty + lambda: FMWSymbols.lambdaMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'lambdaDescriptionStringProperty' ) } ), kDescriptionStringProperty: new PatternStringProperty( FourierMakingWavesStrings.symbolsDialog.kStringProperty, { - k: FMWSymbols.kSymbolProperty + k: FMWSymbols.kMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'kDescriptionStringProperty' ) } ), LDescriptionStringProperty: new PatternStringProperty( FourierMakingWavesStrings.symbolsDialog.LStringProperty, { - L: FMWSymbols.LSymbolProperty + L: FMWSymbols.LMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'LDescriptionStringProperty' ) } ), nDescriptionStringProperty: new PatternStringProperty( FourierMakingWavesStrings.symbolsDialog.nStringProperty, { - n: FMWSymbols.nSymbolProperty + n: FMWSymbols.nMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'nDescriptionStringProperty' ) } ), tDescriptionStringProperty: new PatternStringProperty( FourierMakingWavesStrings.symbolsDialog.tStringProperty, { - t: FMWSymbols.tSymbolProperty + t: FMWSymbols.tMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'tDescriptionStringProperty' ) } ), TDescriptionStringProperty: new PatternStringProperty( FourierMakingWavesStrings.symbolsDialog.TStringProperty, { - T: FMWSymbols.TSymbolProperty + T: FMWSymbols.TMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'TDescriptionStringProperty' ) } ), omegaDescriptionStringProperty: new PatternStringProperty( FourierMakingWavesStrings.symbolsDialog.omegaStringProperty, { - omega: FMWSymbols.omegaSymbolProperty + omega: FMWSymbols.omegaMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'omegaDescriptionStringProperty' ) } ), sigmaDescriptionStringProperty: new PatternStringProperty( FourierMakingWavesStrings.symbolsDialog.sigmaStringProperty, { - sigma: FMWSymbols.sigmaSymbolProperty + sigma: FMWSymbols.sigmaMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'sigmaDescriptionStringProperty' ) } ), xDescriptionStringProperty: new PatternStringProperty( FourierMakingWavesStrings.symbolsDialog.xStringProperty, { - x: FMWSymbols.xSymbolProperty + x: FMWSymbols.xMarkupStringProperty }, { tandem: DERIVED_STRINGS_TANDEM.createTandem( 'xDescriptionStringProperty' ) } ) diff --git a/js/common/FMWSymbols.ts b/js/common/FMWSymbols.ts index a9cf192b..d11d1160 100644 --- a/js/common/FMWSymbols.ts +++ b/js/common/FMWSymbols.ts @@ -19,6 +19,9 @@ import MathSymbolFont from '../../../scenery-phet/js/MathSymbolFont.js'; import fourierMakingWaves from '../fourierMakingWaves.js'; import FourierMakingWavesStrings from '../FourierMakingWavesStrings.js'; +import FMWConstants from './FMWConstants.js'; + +const DERIVED_STRINGS_TANDEM = FMWConstants.DERIVED_STRINGS_TANDEM; const FMWSymbols = { @@ -26,81 +29,102 @@ const FMWSymbols = { // Symbols that are translated // amplitude - ASymbolProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.AStringProperty, { - style: 'normal' + AMarkupStringProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.AStringProperty, { + style: 'normal', + tandem: DERIVED_STRINGS_TANDEM.createTandem( 'AMarkupStringProperty' ) } ), // cosine - cosSymbolProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.cosStringProperty, { - style: 'normal' + cosMarkupStringProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.cosStringProperty, { + style: 'normal', + tandem: DERIVED_STRINGS_TANDEM.createTandem( 'cosMarkupStringProperty' ) } ), // differential, like dx - dSymbolProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.dStringProperty ), + dMarkupStringProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.dStringProperty, { + tandem: DERIVED_STRINGS_TANDEM.createTandem( 'dMarkupStringProperty' ) + } ), // function of frequency - FSymbolProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.FStringProperty, { - style: 'normal' + FMarkupStringProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.FStringProperty, { + style: 'normal', + tandem: DERIVED_STRINGS_TANDEM.createTandem( 'FMarkupStringProperty' ) } ), // frequency - fSymbolProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.fStringProperty ), + fMarkupStringProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.fStringProperty, { + tandem: DERIVED_STRINGS_TANDEM.createTandem( 'fMarkupStringProperty' ) + } ), // wave number - kSymbolProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.kStringProperty ), + kMarkupStringProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.kStringProperty, { + tandem: DERIVED_STRINGS_TANDEM.createTandem( 'kMarkupStringProperty' ) + } ), // string length, if this were a plucked string - LSymbolProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.LStringProperty, { - style: 'normal' + LMarkupStringProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.LStringProperty, { + style: 'normal', + tandem: DERIVED_STRINGS_TANDEM.createTandem( 'LMarkupStringProperty' ) } ), // wavelength - lambdaSymbolProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.lambdaStringProperty, { - style: 'normal' + lambdaMarkupStringProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.lambdaStringProperty, { + style: 'normal', + tandem: DERIVED_STRINGS_TANDEM.createTandem( 'lambdaMarkupStringProperty' ) } ), // mode, order, or harmonic number - nSymbolProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.nStringProperty ), + nMarkupStringProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.nStringProperty, { + tandem: DERIVED_STRINGS_TANDEM.createTandem( 'nMarkupStringProperty' ) + } ), // angular frequency - omegaSymbolProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.omegaStringProperty, { - style: 'normal' + omegaMarkupStringProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.omegaStringProperty, { + style: 'normal', + tandem: DERIVED_STRINGS_TANDEM.createTandem( 'omegaMarkupStringProperty' ) } ), // width of the Gaussian wave packet (dx) - sigmaSymbolProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.sigmaStringProperty, { - style: 'normal' + sigmaMarkupStringProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.sigmaStringProperty, { + style: 'normal', + tandem: DERIVED_STRINGS_TANDEM.createTandem( 'sigmaMarkupStringProperty' ) } ), // sine - sinSymbolProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.sinStringProperty, { - style: 'normal' + sinMarkupStringProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.sinStringProperty, { + style: 'normal', + tandem: DERIVED_STRINGS_TANDEM.createTandem( 'sinMarkupStringProperty' ) } ), // sampling period, or period of the 1st harmonic - TSymbolProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.TStringProperty, { - style: 'normal' + TMarkupStringProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.TStringProperty, { + style: 'normal', + tandem: DERIVED_STRINGS_TANDEM.createTandem( 'TMarkupStringProperty' ) } ), // time - tSymbolProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.tStringProperty ), + tMarkupStringProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.tStringProperty, { + tandem: DERIVED_STRINGS_TANDEM.createTandem( 'tMarkupStringProperty' ) + } ), // position in space along L - xSymbolProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.xStringProperty ), + xMarkupStringProperty: MathSymbolFont.createDerivedProperty( FourierMakingWavesStrings.symbol.xStringProperty, { + tandem: DERIVED_STRINGS_TANDEM.createTandem( 'xMarkupStringProperty' ) + } ), //----------------------------------------------------------------------------------------------------------- // Symbols that are not translated - infinity: MathSymbolFont.getRichTextMarkup( '\u221e', 'normal' ), + infinityMarkup: MathSymbolFont.getRichTextMarkup( '\u221e', 'normal' ), // integration symbol - integral: MathSymbolFont.getRichTextMarkup( '\u222B', 'normal' ), + integralMarkup: MathSymbolFont.getRichTextMarkup( '\u222B', 'normal' ), // pi - pi: MathSymbolFont.getRichTextMarkup( '\u03c0', 'normal' ), + piMarkup: MathSymbolFont.getRichTextMarkup( '\u03c0', 'normal' ), // summation symbol - SIGMA: MathSymbolFont.getRichTextMarkup( '\u03a3', 'normal' ) + sigmaMarkup: MathSymbolFont.getRichTextMarkup( '\u03a3', 'normal' ) }; fourierMakingWaves.register( 'FMWSymbols', FMWSymbols ); diff --git a/js/common/view/AmplitudeKeypadDialog.ts b/js/common/view/AmplitudeKeypadDialog.ts index 48d7be0d..aa2a6ed9 100644 --- a/js/common/view/AmplitudeKeypadDialog.ts +++ b/js/common/view/AmplitudeKeypadDialog.ts @@ -105,7 +105,7 @@ export default class AmplitudeKeypadDialog extends Dialog { // Title indicates which amplitude we're editing, e.g. A2. const titleStringProperty = new DerivedProperty( - [ FMWSymbols.ASymbolProperty, orderProperty ], + [ FMWSymbols.AMarkupStringProperty, orderProperty ], ( A, order ) => `${A}${order}`, { tandem: options.tandem.createTandem( 'titleStringProperty' ), phetioValueType: StringIO diff --git a/js/common/view/AmplitudeNumberDisplay.ts b/js/common/view/AmplitudeNumberDisplay.ts index ea8abcb8..f0e81103 100644 --- a/js/common/view/AmplitudeNumberDisplay.ts +++ b/js/common/view/AmplitudeNumberDisplay.ts @@ -63,7 +63,7 @@ export default class AmplitudeNumberDisplay extends InteractiveHighlighting( VBo options.numberDisplayOptions ); const labelStringProperty = new DerivedProperty( - [ FMWSymbols.ASymbolProperty ], + [ FMWSymbols.AMarkupStringProperty ], A => `${A}${harmonic.order}`, { tandem: options.tandem.createTandem( 'labelStringProperty' ), phetioValueType: StringIO diff --git a/js/common/view/EquationMarkup.ts b/js/common/view/EquationMarkup.ts index a7874530..469b87a6 100644 --- a/js/common/view/EquationMarkup.ts +++ b/js/common/view/EquationMarkup.ts @@ -18,19 +18,19 @@ import SeriesType from '../model/SeriesType.js'; const HIDDEN_STRING = ''; // string for EquationForm.HIDDEN // To improve readability of markup creation. Each of these is a string that may also include markup, added by FMWSymbols. -const An = `${FMWSymbols.ASymbolProperty.value}${FMWSymbols.nSymbolProperty.value}`; -const F = FMWSymbols.FSymbolProperty.value; -const f = FMWSymbols.fSymbolProperty.value; -const k = FMWSymbols.kSymbolProperty.value; -const L = FMWSymbols.LSymbolProperty.value; -const lambda = FMWSymbols.lambdaSymbolProperty.value; +const An = `${FMWSymbols.AMarkupStringProperty.value}${FMWSymbols.nMarkupStringProperty.value}`; +const F = FMWSymbols.FMarkupStringProperty.value; +const f = FMWSymbols.fMarkupStringProperty.value; +const k = FMWSymbols.kMarkupStringProperty.value; +const L = FMWSymbols.LMarkupStringProperty.value; +const lambda = FMWSymbols.lambdaMarkupStringProperty.value; const MINUS = MathSymbols.MINUS; -const n = FMWSymbols.nSymbolProperty.value; -const omega = FMWSymbols.omegaSymbolProperty.value; -const pi = FMWSymbols.pi; -const T = FMWSymbols.TSymbolProperty.value; -const t = FMWSymbols.tSymbolProperty.value; -const x = FMWSymbols.xSymbolProperty.value; +const n = FMWSymbols.nMarkupStringProperty.value; +const omega = FMWSymbols.omegaMarkupStringProperty.value; +const pi = FMWSymbols.piMarkup; +const T = FMWSymbols.TMarkupStringProperty.value; +const t = FMWSymbols.tMarkupStringProperty.value; +const x = FMWSymbols.xMarkupStringProperty.value; // {string} for general form (e.g. 'n') or {number} for a specific harmonic type Order = string | number; @@ -81,11 +81,11 @@ const EquationMarkup = { getComponentsEquationMarkup( domain: Domain, seriesType: SeriesType ): string { assert && assert( domain === Domain.SPACE || domain === Domain.TIME, `unsupported domain: ${domain}` ); - const domainSymbol = ( domain === Domain.SPACE ) ? FMWSymbols.xSymbolProperty.value : FMWSymbols.tSymbolProperty.value; - const componentSymbol = ( domain === Domain.SPACE ) ? FMWSymbols.kSymbolProperty.value : FMWSymbols.omegaSymbolProperty.value; - const seriesTypeString = ( seriesType === SeriesType.SIN ) ? FMWSymbols.sinSymbolProperty.value : FMWSymbols.cosSymbolProperty.value; - return `${FMWSymbols.ASymbolProperty.value}${FMWSymbols.nSymbolProperty.value} ` + - `${seriesTypeString}( ${componentSymbol}${FMWSymbols.nSymbolProperty.value}${domainSymbol} )`; + const domainSymbol = ( domain === Domain.SPACE ) ? FMWSymbols.xMarkupStringProperty.value : FMWSymbols.tMarkupStringProperty.value; + const componentSymbol = ( domain === Domain.SPACE ) ? FMWSymbols.kMarkupStringProperty.value : FMWSymbols.omegaMarkupStringProperty.value; + const seriesTypeString = ( seriesType === SeriesType.SIN ) ? FMWSymbols.sinMarkupStringProperty.value : FMWSymbols.cosMarkupStringProperty.value; + return `${FMWSymbols.AMarkupStringProperty.value}${FMWSymbols.nMarkupStringProperty.value} ` + + `${seriesTypeString}( ${componentSymbol}${FMWSymbols.nMarkupStringProperty.value}${domainSymbol} )`; } }; @@ -180,7 +180,7 @@ function getSpaceAndTimeMarkup( seriesType: SeriesType, equationForm: EquationFo * Converts a SeriesType to markup. */ function seriesTypeToMarkup( seriesType: SeriesType ): string { - return ( seriesType === SeriesType.SIN ) ? FMWSymbols.sinSymbolProperty.value : FMWSymbols.cosSymbolProperty.value; + return ( seriesType === SeriesType.SIN ) ? FMWSymbols.sinMarkupStringProperty.value : FMWSymbols.cosMarkupStringProperty.value; } fourierMakingWaves.register( 'EquationMarkup', EquationMarkup ); diff --git a/js/common/view/InteractiveAmplitudesChartNode.ts b/js/common/view/InteractiveAmplitudesChartNode.ts index 7c01ba3f..7c96a0f0 100644 --- a/js/common/view/InteractiveAmplitudesChartNode.ts +++ b/js/common/view/InteractiveAmplitudesChartNode.ts @@ -92,7 +92,7 @@ export default class InteractiveAmplitudesChartNode extends Node { // x axis --------------------------------------------------------- - const xAxisLabelText = new RichText( FMWSymbols.nSymbolProperty, { + const xAxisLabelText = new RichText( FMWSymbols.nMarkupStringProperty, { font: FMWConstants.AXIS_LABEL_FONT, left: chartRectangle.right + FMWConstants.X_AXIS_LABEL_SPACING, centerY: chartRectangle.centerY, diff --git a/js/common/view/SeriesTypeRadioButtonGroup.ts b/js/common/view/SeriesTypeRadioButtonGroup.ts index 9596082b..f34db35f 100644 --- a/js/common/view/SeriesTypeRadioButtonGroup.ts +++ b/js/common/view/SeriesTypeRadioButtonGroup.ts @@ -32,12 +32,12 @@ export default class SeriesTypeRadioButtonGroup extends HorizontalAquaRadioButto const items: AquaRadioButtonGroupItem[] = [ { value: SeriesType.SIN, - createNode: () => new RichText( FMWSymbols.sinSymbolProperty, textOptions ), + createNode: () => new RichText( FMWSymbols.sinMarkupStringProperty, textOptions ), tandemName: `sin${AquaRadioButton.TANDEM_NAME_SUFFIX}` }, { value: SeriesType.COS, - createNode: () => new RichText( FMWSymbols.cosSymbolProperty, textOptions ), + createNode: () => new RichText( FMWSymbols.cosMarkupStringProperty, textOptions ), tandemName: `cos${AquaRadioButton.TANDEM_NAME_SUFFIX}` } ]; diff --git a/js/common/view/SumSymbolNode.ts b/js/common/view/SumSymbolNode.ts index d9a81c0a..f232686a 100644 --- a/js/common/view/SumSymbolNode.ts +++ b/js/common/view/SumSymbolNode.ts @@ -41,12 +41,12 @@ export default class SumSymbolNode extends Node { private readonly disposeSummationSymbolNode: () => void; /** - * @param indexSymbolProperty - symbol for the index of summation + * @param indexMarkupStringProperty - symbol for the index of summation * @param indexMin - index min value * @param indexMaxProperty - index max value * @param [providedOptions] */ - public constructor( indexSymbolProperty: TReadOnlyProperty, indexMin: number, + public constructor( indexMarkupStringProperty: TReadOnlyProperty, indexMin: number, indexMaxProperty: TReadOnlyProperty, providedOptions?: SumSymbolNodeOptions ) { const options = optionize()( { @@ -64,7 +64,7 @@ export default class SumSymbolNode extends Node { } ); // Not instrumented for PhET-iO. - const nEqualsStringProperty = new DerivedProperty( [ indexSymbolProperty ], + const nEqualsStringProperty = new DerivedProperty( [ indexMarkupStringProperty ], indexSymbol => `${indexSymbol} ${MathSymbols.EQUAL_TO} ` ); // Index and min (starting) value, which appears below the sum symbol. E.g. 'n = 0' @@ -99,11 +99,11 @@ export default class SumSymbolNode extends Node { // update text if ( integration ) { - symbolNode.string = FMWSymbols.integral; + symbolNode.string = FMWSymbols.integralMarkup; minValueNode.string = indexToString( indexMin ); } else { - symbolNode.string = FMWSymbols.SIGMA; + symbolNode.string = FMWSymbols.sigmaMarkup; minValueNode.string = indexToString( indexMin ); } maxValueNode.string = indexToString( indexMax ); diff --git a/js/common/view/TickLabelUtils.ts b/js/common/view/TickLabelUtils.ts index 66462f88..a30bdc63 100644 --- a/js/common/view/TickLabelUtils.ts +++ b/js/common/view/TickLabelUtils.ts @@ -85,7 +85,7 @@ const TickLabelUtils = { * Creates a tick label for multiples of PI, by converting a value to a coefficient followed by the PI symbol. */ createPiTickLabel( value: number, coefficientDecimals: number, options?: RichTextOptions ): Node { - return TickLabelUtils.createSymbolicTickLabel( value, FMWSymbols.pi, Math.PI, coefficientDecimals, options ); + return TickLabelUtils.createSymbolicTickLabel( value, FMWSymbols.piMarkup, Math.PI, coefficientDecimals, options ); }, /** @@ -103,7 +103,7 @@ const TickLabelUtils = { return TickLabelUtils.createNumericTickLabel( value, decimalPlaces ); } else { - const symbolStringProperty = ( domain === Domain.TIME ) ? FMWSymbols.TSymbolProperty : FMWSymbols.LSymbolProperty; + const symbolStringProperty = ( domain === Domain.TIME ) ? FMWSymbols.TMarkupStringProperty : FMWSymbols.LMarkupStringProperty; const symbolValue = ( domain === Domain.TIME ) ? T : L; return TickLabelUtils.createSymbolicTickLabel( value, symbolStringProperty, symbolValue, decimalPlaces ); } diff --git a/js/discrete/model/DiscreteModel.ts b/js/discrete/model/DiscreteModel.ts index a452324e..1f2c35b8 100644 --- a/js/discrete/model/DiscreteModel.ts +++ b/js/discrete/model/DiscreteModel.ts @@ -105,10 +105,10 @@ export default class DiscreteModel implements TModel { // Group elements related to measurement tools under this tandem. const measurementToolsTandem = tandem.createTandem( 'measurementTools' ); - this.wavelengthTool = new DiscreteMeasurementTool( FMWSymbols.lambdaSymbolProperty, + this.wavelengthTool = new DiscreteMeasurementTool( FMWSymbols.lambdaMarkupStringProperty, this.fourierSeries.numberOfHarmonicsProperty, measurementToolsTandem.createTandem( 'wavelengthTool' ) ); - this.periodTool = new DiscreteMeasurementTool( FMWSymbols.TSymbolProperty, + this.periodTool = new DiscreteMeasurementTool( FMWSymbols.TMarkupStringProperty, this.fourierSeries.numberOfHarmonicsProperty, measurementToolsTandem.createTandem( 'periodTool' ) ); // {DerivedProperty.} diff --git a/js/discrete/view/DiscreteControlPanel.ts b/js/discrete/view/DiscreteControlPanel.ts index 7a8ecdc2..0a85d1b1 100644 --- a/js/discrete/view/DiscreteControlPanel.ts +++ b/js/discrete/view/DiscreteControlPanel.ts @@ -317,7 +317,7 @@ class MeasurementToolsSubpanel extends VBox { // Wavelength const wavelengthCheckbox = new WavelengthCheckbox( wavelengthTool.isSelectedProperty, domainProperty, tandem.createTandem( 'wavelengthCheckbox' ) ); - const wavelengthSpinner = new OrderSpinner( FMWSymbols.lambdaSymbolProperty, wavelengthTool.orderProperty, { + const wavelengthSpinner = new OrderSpinner( FMWSymbols.lambdaMarkupStringProperty, wavelengthTool.orderProperty, { enabledProperty: new DerivedProperty( [ wavelengthTool.isSelectedProperty, domainProperty ], ( isSelected, domain ) => isSelected && ( domain === Domain.SPACE || domain === Domain.SPACE_AND_TIME ) @@ -334,7 +334,7 @@ class MeasurementToolsSubpanel extends VBox { // Period const periodCheckbox = new PeriodCheckbox( periodTool.isSelectedProperty, domainProperty, tandem.createTandem( 'periodCheckbox' ) ); - const periodSpinner = new OrderSpinner( FMWSymbols.TSymbolProperty, periodTool.orderProperty, { + const periodSpinner = new OrderSpinner( FMWSymbols.TMarkupStringProperty, periodTool.orderProperty, { enabledProperty: new DerivedProperty( [ periodTool.isSelectedProperty, domainProperty ], ( isSelected, domain ) => isSelected && ( domain === Domain.TIME || domain === Domain.SPACE_AND_TIME ) diff --git a/js/discrete/view/DiscreteSumEquationNode.ts b/js/discrete/view/DiscreteSumEquationNode.ts index a485e9b6..bac96eb6 100644 --- a/js/discrete/view/DiscreteSumEquationNode.ts +++ b/js/discrete/view/DiscreteSumEquationNode.ts @@ -57,7 +57,7 @@ export default class DiscreteSumEquationNode extends Node { } ); // Capital sigma, summation symbol - const summationNode = new SumSymbolNode( FMWSymbols.nSymbolProperty, 1, numberOfHarmonicsProperty ); + const summationNode = new SumSymbolNode( FMWSymbols.nMarkupStringProperty, 1, numberOfHarmonicsProperty ); // Everything to the right of the summation symbol, set in multilink below const rightNode = new RichText( '', { diff --git a/js/discrete/view/EquationComboBox.ts b/js/discrete/view/EquationComboBox.ts index ea8f46b6..43b68122 100644 --- a/js/discrete/view/EquationComboBox.ts +++ b/js/discrete/view/EquationComboBox.ts @@ -35,31 +35,31 @@ const CHOICES: FMWComboBoxChoice[] = [ }, { value: EquationForm.WAVELENGTH, - stringProperty: FMWSymbols.lambdaSymbolProperty, + stringProperty: FMWSymbols.lambdaMarkupStringProperty, textOptions: MATH_TEXT_OPTIONS, tandemName: `wavelength${ComboBox.ITEM_TANDEM_NAME_SUFFIX}` }, { value: EquationForm.SPATIAL_WAVE_NUMBER, - stringProperty: FMWSymbols.kSymbolProperty, + stringProperty: FMWSymbols.kMarkupStringProperty, textOptions: MATH_TEXT_OPTIONS, tandemName: `spatialWaveNumber${ComboBox.ITEM_TANDEM_NAME_SUFFIX}` }, { value: EquationForm.FREQUENCY, - stringProperty: FMWSymbols.fSymbolProperty, + stringProperty: FMWSymbols.fMarkupStringProperty, textOptions: MATH_TEXT_OPTIONS, tandemName: `frequency${ComboBox.ITEM_TANDEM_NAME_SUFFIX}` }, { value: EquationForm.PERIOD, - stringProperty: FMWSymbols.TSymbolProperty, + stringProperty: FMWSymbols.TMarkupStringProperty, textOptions: MATH_TEXT_OPTIONS, tandemName: `period${ComboBox.ITEM_TANDEM_NAME_SUFFIX}` }, { value: EquationForm.ANGULAR_WAVE_NUMBER, - stringProperty: FMWSymbols.omegaSymbolProperty, + stringProperty: FMWSymbols.omegaMarkupStringProperty, textOptions: MATH_TEXT_OPTIONS, tandemName: `angularWaveNumber${ComboBox.ITEM_TANDEM_NAME_SUFFIX}` }, @@ -77,7 +77,7 @@ const CHOICES: FMWComboBoxChoice[] = [ }, { value: EquationForm.MODE, - stringProperty: FMWSymbols.nSymbolProperty, + stringProperty: FMWSymbols.nMarkupStringProperty, textOptions: MATH_TEXT_OPTIONS, tandemName: `mode${ComboBox.ITEM_TANDEM_NAME_SUFFIX}` } diff --git a/js/discrete/view/PeriodClockNode.ts b/js/discrete/view/PeriodClockNode.ts index 993ccb84..18d5f0aa 100644 --- a/js/discrete/view/PeriodClockNode.ts +++ b/js/discrete/view/PeriodClockNode.ts @@ -49,7 +49,7 @@ export default class PeriodClockNode extends DiscreteMeasurementToolNode { const clockFaceNode = new ClockFaceNode( harmonicProperty, tProperty ); - const labelStringProperty = new DerivedProperty( [ FMWSymbols.TSymbolProperty, harmonicProperty ], + const labelStringProperty = new DerivedProperty( [ FMWSymbols.TMarkupStringProperty, harmonicProperty ], ( T, harmonic ) => `${T}${harmonic.order}`, { tandem: providedOptions.tandem.createTandem( 'labelStringProperty' ) } ); diff --git a/js/wavepacket/view/CenterControl.ts b/js/wavepacket/view/CenterControl.ts index c58d6a1d..87be0548 100644 --- a/js/wavepacket/view/CenterControl.ts +++ b/js/wavepacket/view/CenterControl.ts @@ -38,9 +38,9 @@ export default class CenterControl extends WavePacketNumberControl { // Add symbolic tick marks. This is more hard-coded than I'd prefer, but is clear and straightforward. majorTicks: [ - { value: 9 * Math.PI, label: new RichText( `9${FMWSymbols.pi}`, TEXT_OPTIONS ) }, - { value: 12 * Math.PI, label: new RichText( `12${FMWSymbols.pi}`, TEXT_OPTIONS ) }, - { value: 15 * Math.PI, label: new RichText( `15${FMWSymbols.pi}`, TEXT_OPTIONS ) } + { value: 9 * Math.PI, label: new RichText( `9${FMWSymbols.piMarkup}`, TEXT_OPTIONS ) }, + { value: 12 * Math.PI, label: new RichText( `12${FMWSymbols.piMarkup}`, TEXT_OPTIONS ) }, + { value: 15 * Math.PI, label: new RichText( `15${FMWSymbols.piMarkup}`, TEXT_OPTIONS ) } ], minorTickSpacing: Math.PI, @@ -58,8 +58,8 @@ export default class CenterControl extends WavePacketNumberControl { // In addition to the domain, this is dependent on a number of localized string Properties. Multilink.multilink( [ domainProperty, - FMWSymbols.kSymbolProperty, - FMWSymbols.omegaSymbolProperty, + FMWSymbols.kMarkupStringProperty, + FMWSymbols.omegaMarkupStringProperty, FourierMakingWavesStrings.units.radiansPerMeterStringProperty, FourierMakingWavesStrings.units.radiansPerMillisecondStringProperty, FourierMakingWavesStrings.symbolValueUnitsStringProperty diff --git a/js/wavepacket/view/ComponentSpacingControl.ts b/js/wavepacket/view/ComponentSpacingControl.ts index 11267798..b76e7f60 100644 --- a/js/wavepacket/view/ComponentSpacingControl.ts +++ b/js/wavepacket/view/ComponentSpacingControl.ts @@ -53,9 +53,9 @@ export default class ComponentSpacingControl extends WavePacketNumberControl { // It was easy to change during development, and is supported by assertions below. majorTicks: [ { value: 0, label: new RichText( '0', TEXT_OPTIONS ) }, - { value: 1, label: new RichText( `${FMWSymbols.pi}/4`, TEXT_OPTIONS ) }, - { value: 2, label: new RichText( `${FMWSymbols.pi}/2`, TEXT_OPTIONS ) }, - { value: 3, label: new RichText( `${FMWSymbols.pi}`, TEXT_OPTIONS ) } + { value: 1, label: new RichText( `${FMWSymbols.piMarkup}/4`, TEXT_OPTIONS ) }, + { value: 2, label: new RichText( `${FMWSymbols.piMarkup}/2`, TEXT_OPTIONS ) }, + { value: 3, label: new RichText( `${FMWSymbols.piMarkup}`, TEXT_OPTIONS ) } ], // pdom options @@ -93,8 +93,8 @@ export default class ComponentSpacingControl extends WavePacketNumberControl { // In addition to the domain, this is dependent on a number of localized string Properties. Multilink.multilink( [ domainProperty, - FMWSymbols.kSymbolProperty, - FMWSymbols.omegaSymbolProperty, + FMWSymbols.kMarkupStringProperty, + FMWSymbols.omegaMarkupStringProperty, FourierMakingWavesStrings.units.radiansPerMeterStringProperty, FourierMakingWavesStrings.units.radiansPerMillisecondStringProperty, FourierMakingWavesStrings.symbolValueUnitsStringProperty diff --git a/js/wavepacket/view/ConjugateStandardDeviationControl.ts b/js/wavepacket/view/ConjugateStandardDeviationControl.ts index ef201aed..088dccbc 100644 --- a/js/wavepacket/view/ConjugateStandardDeviationControl.ts +++ b/js/wavepacket/view/ConjugateStandardDeviationControl.ts @@ -52,9 +52,9 @@ export default class ConjugateStandardDeviationControl extends WavePacketNumberC // Add symbolic tick marks. This is more hard-coded than I'd prefer, but is clear and straightforward. // It was easy to change during development, and is supported by the assertions below. majorTicks: [ - { value: 1 / ( 4 * Math.PI ), label: new RichText( `1/(4${FMWSymbols.pi})`, TEXT_OPTIONS ) }, - { value: 1 / ( 2 * Math.PI ), label: new RichText( `1/(2${FMWSymbols.pi})`, TEXT_OPTIONS ) }, - { value: 1 / Math.PI, label: new RichText( `1/${FMWSymbols.pi}`, TEXT_OPTIONS ) } + { value: 1 / ( 4 * Math.PI ), label: new RichText( `1/(4${FMWSymbols.piMarkup})`, TEXT_OPTIONS ) }, + { value: 1 / ( 2 * Math.PI ), label: new RichText( `1/(2${FMWSymbols.piMarkup})`, TEXT_OPTIONS ) }, + { value: 1 / Math.PI, label: new RichText( `1/${FMWSymbols.piMarkup}`, TEXT_OPTIONS ) } ], // pdom options @@ -80,11 +80,11 @@ export default class ConjugateStandardDeviationControl extends WavePacketNumberC // In addition to the domain, this is dependent on a number of localized string Properties. Multilink.multilink( [ domainProperty, - FMWSymbols.sigmaSymbolProperty, - FMWSymbols.xSymbolProperty, - FMWSymbols.tSymbolProperty, - FMWSymbols.kSymbolProperty, - FMWSymbols.omegaSymbolProperty, + FMWSymbols.sigmaMarkupStringProperty, + FMWSymbols.xMarkupStringProperty, + FMWSymbols.tMarkupStringProperty, + FMWSymbols.kMarkupStringProperty, + FMWSymbols.omegaMarkupStringProperty, FourierMakingWavesStrings.units.metersStringProperty, FourierMakingWavesStrings.units.millisecondsStringProperty, FourierMakingWavesStrings.symbolSymbolValueUnitsStringProperty diff --git a/js/wavepacket/view/LengthToolCheckbox.ts b/js/wavepacket/view/LengthToolCheckbox.ts index aa7c6791..1716b9e9 100644 --- a/js/wavepacket/view/LengthToolCheckbox.ts +++ b/js/wavepacket/view/LengthToolCheckbox.ts @@ -21,10 +21,10 @@ export default class LengthToolCheckbox extends CaliperCheckbox { public constructor( visibleProperty: Property, domainProperty: EnumerationProperty, tandem: Tandem ) { - const spaceSymbolStringProperty = new DerivedProperty( [ FMWSymbols.lambdaSymbolProperty ], + const spaceSymbolStringProperty = new DerivedProperty( [ FMWSymbols.lambdaMarkupStringProperty ], lambda => `${lambda}1` ); - const timeSymbolStringProperty = new DerivedProperty( [ FMWSymbols.TSymbolProperty ], + const timeSymbolStringProperty = new DerivedProperty( [ FMWSymbols.TMarkupStringProperty ], T => `${T}1` ); super( visibleProperty, domainProperty, spaceSymbolStringProperty, timeSymbolStringProperty, { diff --git a/js/wavepacket/view/StandardDeviationControl.ts b/js/wavepacket/view/StandardDeviationControl.ts index 16b354a7..9bba842e 100644 --- a/js/wavepacket/view/StandardDeviationControl.ts +++ b/js/wavepacket/view/StandardDeviationControl.ts @@ -42,10 +42,10 @@ export default class StandardDeviationControl extends WavePacketNumberControl { // Add symbolic tick marks. This is more hard-coded than I'd prefer, but is clear and straightforward. // It was easy to change during development, and is supported by the assertions below. majorTicks: [ - { value: Math.PI, label: new RichText( `${FMWSymbols.pi}`, TEXT_OPTIONS ) }, - { value: 2 * Math.PI, label: new RichText( `2${FMWSymbols.pi}`, TEXT_OPTIONS ) }, - { value: 3 * Math.PI, label: new RichText( `3${FMWSymbols.pi}`, TEXT_OPTIONS ) }, - { value: 4 * Math.PI, label: new RichText( `4${FMWSymbols.pi}`, TEXT_OPTIONS ) } + { value: Math.PI, label: new RichText( `${FMWSymbols.piMarkup}`, TEXT_OPTIONS ) }, + { value: 2 * Math.PI, label: new RichText( `2${FMWSymbols.piMarkup}`, TEXT_OPTIONS ) }, + { value: 3 * Math.PI, label: new RichText( `3${FMWSymbols.piMarkup}`, TEXT_OPTIONS ) }, + { value: 4 * Math.PI, label: new RichText( `4${FMWSymbols.piMarkup}`, TEXT_OPTIONS ) } ], // pdom options @@ -71,9 +71,9 @@ export default class StandardDeviationControl extends WavePacketNumberControl { // In addition to the domain, this is dependent on a number of localized string Properties. Multilink.multilink( [ domainProperty, - FMWSymbols.sigmaSymbolProperty, - FMWSymbols.kSymbolProperty, - FMWSymbols.omegaSymbolProperty, + FMWSymbols.sigmaMarkupStringProperty, + FMWSymbols.kMarkupStringProperty, + FMWSymbols.omegaMarkupStringProperty, FourierMakingWavesStrings.units.radiansPerMeterStringProperty, FourierMakingWavesStrings.units.radiansPerMillisecondStringProperty, FourierMakingWavesStrings.symbolValueUnitsStringProperty diff --git a/js/wavepacket/view/WavePacketAmplitudesChartNode.ts b/js/wavepacket/view/WavePacketAmplitudesChartNode.ts index 676ff1ee..829536c7 100644 --- a/js/wavepacket/view/WavePacketAmplitudesChartNode.ts +++ b/js/wavepacket/view/WavePacketAmplitudesChartNode.ts @@ -57,8 +57,8 @@ export default class WavePacketAmplitudesChartNode extends DomainChartNode { // DomainChartNode options // Units for the x-axis labels are omitted by request, due to space constraints. // See https://github.com/phetsims/fourier-making-waves/issues/137. - xSpaceLabelProperty: FMWSymbols.kSymbolProperty, - xTimeLabelProperty: FMWSymbols.omegaSymbolProperty, + xSpaceLabelProperty: FMWSymbols.kMarkupStringProperty, + xTimeLabelProperty: FMWSymbols.omegaMarkupStringProperty, xTickMarkSpacing: Math.PI, xTickLabelSpacing: 2 * Math.PI, xTickLabelSetOptions: { @@ -123,8 +123,8 @@ export default class WavePacketAmplitudesChartNode extends DomainChartNode { // Width indicator, labeled dimensional arrows const widthIndicatorPlot = new WidthIndicatorPlot( this.chartTransform, widthIndicatorWidthProperty, widthIndicatorPositionProperty, domainProperty, { - spaceSymbolStringProperty: FMWSymbols.kSymbolProperty, - timeSymbolStringProperty: FMWSymbols.omegaSymbolProperty, + spaceSymbolStringProperty: FMWSymbols.kMarkupStringProperty, + timeSymbolStringProperty: FMWSymbols.omegaMarkupStringProperty, visibleProperty: widthIndicatorsVisibleProperty } ); diff --git a/js/wavepacket/view/WavePacketLengthToolNode.ts b/js/wavepacket/view/WavePacketLengthToolNode.ts index 32f0621b..44a33633 100644 --- a/js/wavepacket/view/WavePacketLengthToolNode.ts +++ b/js/wavepacket/view/WavePacketLengthToolNode.ts @@ -35,9 +35,9 @@ export default class WavePacketLengthToolNode extends WavePacketMeasurementToolN // WavePacketMeasurementToolNodeOptions fill: FMWColors.wavePacketLengthToolFillProperty, - spaceSymbolStringProperty: new DerivedProperty( [ FMWSymbols.lambdaSymbolProperty ], + spaceSymbolStringProperty: new DerivedProperty( [ FMWSymbols.lambdaMarkupStringProperty ], lambda => `${lambda}1` ), - timeSymbolStringProperty: new DerivedProperty( [ FMWSymbols.TSymbolProperty ], + timeSymbolStringProperty: new DerivedProperty( [ FMWSymbols.TMarkupStringProperty ], T => `${T}1` ) }, providedOptions ); diff --git a/js/wavepacket/view/WavePacketMeasurementToolNode.ts b/js/wavepacket/view/WavePacketMeasurementToolNode.ts index fff9b093..37d5d1ad 100644 --- a/js/wavepacket/view/WavePacketMeasurementToolNode.ts +++ b/js/wavepacket/view/WavePacketMeasurementToolNode.ts @@ -105,7 +105,7 @@ export default class WavePacketMeasurementToolNode extends Node { calipersNode.visible = false; calipersNode.setMeasuredWidth( 0 ); infinityBackgroundNode.visible = true; - infinityText.string = `${symbol} = ${FMWSymbols.infinity}`; + infinityText.string = `${symbol} = ${FMWSymbols.infinityMarkup}`; } else { calipersNode.visible = true; diff --git a/js/wavepacket/view/WavePacketScreenView.ts b/js/wavepacket/view/WavePacketScreenView.ts index d7ca241f..e6b02431 100644 --- a/js/wavepacket/view/WavePacketScreenView.ts +++ b/js/wavepacket/view/WavePacketScreenView.ts @@ -84,7 +84,7 @@ export default class WavePacketScreenView extends ScreenView { } ); const amplitudesEquationStringProperty = new DerivedProperty( - [ FMWSymbols.ASymbolProperty, FMWSymbols.nSymbolProperty ], + [ FMWSymbols.AMarkupStringProperty, FMWSymbols.nMarkupStringProperty ], ( A, n ) => `${A}${n}` ); diff --git a/js/wavepacket/view/WavePacketSumChartNode.ts b/js/wavepacket/view/WavePacketSumChartNode.ts index dbd5c18c..35ba3221 100644 --- a/js/wavepacket/view/WavePacketSumChartNode.ts +++ b/js/wavepacket/view/WavePacketSumChartNode.ts @@ -99,8 +99,8 @@ export default class WavePacketSumChartNode extends DomainChartNode { // Width indicator, labeled dimensional arrows const widthIndicatorPlot = new WidthIndicatorPlot( this.chartTransform, widthIndicatorWidthProperty, widthIndicatorPositionProperty, domainProperty, { - spaceSymbolStringProperty: FMWSymbols.xSymbolProperty, - timeSymbolStringProperty: FMWSymbols.tSymbolProperty, + spaceSymbolStringProperty: FMWSymbols.xMarkupStringProperty, + timeSymbolStringProperty: FMWSymbols.tMarkupStringProperty, visibleProperty: widthIndicatorsVisibleProperty } ); diff --git a/js/wavepacket/view/WavePacketSumEquationNode.ts b/js/wavepacket/view/WavePacketSumEquationNode.ts index 38d7049d..2e80866c 100644 --- a/js/wavepacket/view/WavePacketSumEquationNode.ts +++ b/js/wavepacket/view/WavePacketSumEquationNode.ts @@ -35,7 +35,7 @@ export default class WavePacketSumEquationNode extends Node { } ); // Capital sigma, summation symbol - const sumSymbolNode = new SumSymbolNode( FMWSymbols.nSymbolProperty, -Infinity, new NumberProperty( Infinity ), { + const sumSymbolNode = new SumSymbolNode( FMWSymbols.nMarkupStringProperty, -Infinity, new NumberProperty( Infinity ), { minMaxFont: new PhetFont( 16 ) } ); @@ -52,8 +52,8 @@ export default class WavePacketSumEquationNode extends Node { Multilink.multilink( [ domainProperty, seriesTypeProperty, componentSpacingProperty, - FMWSymbols.xSymbolProperty, FMWSymbols.tSymbolProperty, FMWSymbols.kSymbolProperty, FMWSymbols.omegaSymbolProperty, - FMWSymbols.sinSymbolProperty, FMWSymbols.cosSymbolProperty, FMWSymbols.ASymbolProperty, FMWSymbols.dSymbolProperty + FMWSymbols.xMarkupStringProperty, FMWSymbols.tMarkupStringProperty, FMWSymbols.kMarkupStringProperty, FMWSymbols.omegaMarkupStringProperty, + FMWSymbols.sinMarkupStringProperty, FMWSymbols.cosMarkupStringProperty, FMWSymbols.AMarkupStringProperty, FMWSymbols.dMarkupStringProperty ], ( domain, seriesType, componentSpacing, x, t, k, omega, sin, cos, A, d ) => { diff --git a/js/wavepacket/view/WidthIndicatorPlot.ts b/js/wavepacket/view/WidthIndicatorPlot.ts index d52f47ab..c8fcb233 100644 --- a/js/wavepacket/view/WidthIndicatorPlot.ts +++ b/js/wavepacket/view/WidthIndicatorPlot.ts @@ -50,7 +50,7 @@ export default class WidthIndicatorPlot extends Node { const dimensionalArrowsNode = new HorizontalDimensionalArrowsNode( FMWColors.widthIndicatorsColorProperty ); const labelStringProperty = new DerivedProperty( - [ domainProperty, FMWSymbols.sigmaSymbolProperty, options.spaceSymbolStringProperty, options.timeSymbolStringProperty ], + [ domainProperty, FMWSymbols.sigmaMarkupStringProperty, options.spaceSymbolStringProperty, options.timeSymbolStringProperty ], ( domain, sigma, spaceSymbol, timeSymbol ) => { const waveNumberSymbol = ( domain === Domain.SPACE ) ? spaceSymbol : timeSymbol; return `2${sigma}${waveNumberSymbol}`;