Skip to content

Commit

Permalink
tandemNameSuffix, phetsims/tandem#310
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Feb 28, 2024
1 parent 89f1227 commit 1b20dd7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
5 changes: 0 additions & 5 deletions js/AquaRadioButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ export default class AquaRadioButton<T> extends WidthSizable( Voicing( Node ) )

public static readonly DEFAULT_RADIUS = 7;

public static readonly TANDEM_NAME_SUFFIX = 'RadioButton';

public readonly onInputEmitter: TEmitter = new Emitter();

// Handles layout of the content, rectangles and mouse/touch areas
Expand Down Expand Up @@ -123,9 +121,6 @@ export default class AquaRadioButton<T> extends WidthSizable( Voicing( Node ) )

}, providedOptions );

assert && assert( !options.tandem.supplied || options.tandem.name.endsWith( AquaRadioButton.TANDEM_NAME_SUFFIX ),
`AquaRadioButton tandem.name must end with ${AquaRadioButton.TANDEM_NAME_SUFFIX}: ${options.tandem.phetioID}` );

super();

this.value = value;
Expand Down
7 changes: 1 addition & 6 deletions js/buttons/RectangularRadioButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ export default class RectangularRadioButton<T> extends RectangularButton {

private readonly disposeRectangularRadioButton: () => void;

public static readonly TANDEM_NAME_SUFFIX = 'RadioButton';

/**
* @param property - axon Property that can take on a set of values, one for each radio button in the group
* @param value - value when this radio button is selected
Expand Down Expand Up @@ -97,13 +95,10 @@ export default class RectangularRadioButton<T> extends RectangularButton {

// phet-io
tandem: Tandem.REQUIRED,
tandemNameSuffix: 'Button',
tandemNameSuffix: 'RadioButton',
phetioReadOnly: PhetioObject.DEFAULT_OPTIONS.phetioReadOnly // to support properly passing this to children, see https://github.com/phetsims/tandem/issues/60
}, providedOptions );

assert && assert( !options.tandem.supplied || options.tandem.name.endsWith( RectangularRadioButton.TANDEM_NAME_SUFFIX ),
`RectangularRadioButton tandem.name must end with ${RectangularRadioButton.TANDEM_NAME_SUFFIX}: ${options.tandem.phetioID}` );

// ButtonModel is responsible for enabledProperty, so propagate enabledPropertyOptions.
// tandem is also propagated because we want enabledProperty to appear as a child of this button.
// Since enabledProperty is unrelated to the look of the button when selected/deselected, we've also included
Expand Down

0 comments on commit 1b20dd7

Please sign in to comment.