Skip to content

Commit

Permalink
Rename to SceneRadioButtonGroup, see #164
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed May 4, 2023
1 parent fcd04a2 commit 898f5ad
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
3 changes: 0 additions & 3 deletions js/common/view/SceneView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ export default class SceneView {
soccerPlayerNodes.forEach( soccerPlayerNode => frontObjectLayer.addChild( soccerPlayerNode ) );

model.isShowingPlayAreaMedianProperty.link( this.updateMedianNode );

// TODO: https://github.com/phetsims/center-and-variability/issues/164
// this.accordionBox.expandedProperty.link( this.updateMedianNode );
}

public reset(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ import Tandem from '../../../../tandem/js/Tandem.js';
import CAVSceneModel from '../../common/model/CAVSceneModel.js';

type SelfOptions = EmptySelfOptions;
type DistributionRadioButtonGroupOptions = SelfOptions & RectangularRadioButtonGroupOptions;
type SceneRadioButtonGroupOptions = SelfOptions & RectangularRadioButtonGroupOptions;

// TODO: Rename to SceneRadioButtonGroup, see https://github.com/phetsims/center-and-variability/issues/164
export default class DistributionRadioButtonGroup extends RectangularRadioButtonGroup<CAVSceneModel> {
export default class SceneRadioButtonGroup extends RectangularRadioButtonGroup<CAVSceneModel> {

public constructor( property: Property<CAVSceneModel>, providedOptions: DistributionRadioButtonGroupOptions ) {
const options = optionize<DistributionRadioButtonGroupOptions, SelfOptions, RectangularRadioButtonGroupOptions>()( {
public constructor( property: Property<CAVSceneModel>, providedOptions: SceneRadioButtonGroupOptions ) {
const options = optionize<SceneRadioButtonGroupOptions, SelfOptions, RectangularRadioButtonGroupOptions>()( {
radioButtonOptions: {
baseColor: 'white'
}
Expand Down Expand Up @@ -63,4 +62,4 @@ export default class DistributionRadioButtonGroup extends RectangularRadioButton
}
}

centerAndVariability.register( 'DistributionRadioButtonGroup', DistributionRadioButtonGroup );
centerAndVariability.register( 'SceneRadioButtonGroup', SceneRadioButtonGroup );
14 changes: 7 additions & 7 deletions js/variability/view/VariabilityScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import VariabilityModel from '../model/VariabilityModel.js';
import CAVColors from '../../common/CAVColors.js';
import CenterAndVariabilityStrings from '../../CenterAndVariabilityStrings.js';
import { AlignGroup, ManualConstraint } from '../../../../scenery/js/imports.js';
import DistributionRadioButtonGroup from './DistributionRadioButtonGroup.js';
import SceneRadioButtonGroup from './SceneRadioButtonGroup.js';
import VariabilityMeasureRadioButtonGroup from './VariabilityMeasureRadioButtonGroup.js';
import InfoDialog from './InfoDialog.js';
import CAVScreenView, { CAVScreenViewOptions } from '../../common/view/CAVScreenView.js';
Expand Down Expand Up @@ -52,18 +52,18 @@ export default class VariabilityScreenView extends CAVScreenView {
variabilityRadioButtonGroupWrapper.centerY = accordionBoxWrapper.centerY;
} );

const distributionRadioButtonGroup = new DistributionRadioButtonGroup( model.selectedSceneModelProperty, {
const sceneRadioButtonGroup = new SceneRadioButtonGroup( model.selectedSceneModelProperty, {
left: 10,
tandem: options.tandem.createTandem( 'distributionRadioButtonGroup' )
tandem: options.tandem.createTandem( 'sceneRadioButtonGroup' )
} );

// Float above the ground
ManualConstraint.create( this, [ this.playAreaNumberLineNode, distributionRadioButtonGroup ],
( lowerNumberLineWrapper, distributionRadioButtonGroupWrapper ) => {
distributionRadioButtonGroupWrapper.bottom = lowerNumberLineWrapper.top - 10;
ManualConstraint.create( this, [ this.playAreaNumberLineNode, sceneRadioButtonGroup ],
( lowerNumberLineWrapper, sceneRadioButtonGroupWrapper ) => {
sceneRadioButtonGroupWrapper.bottom = lowerNumberLineWrapper.top - 10;
} );

this.addChild( distributionRadioButtonGroup );
this.addChild( sceneRadioButtonGroup );
this.addChild( variabilityMeasureRadioButtonGroup );

model.sceneModels.forEach( sceneModel => {
Expand Down

0 comments on commit 898f5ad

Please sign in to comment.