From 898f5ad67b5c2ad9a4ddad7442f44bff15ddab54 Mon Sep 17 00:00:00 2001 From: Sam Reid Date: Wed, 3 May 2023 20:29:25 -0600 Subject: [PATCH] Rename to SceneRadioButtonGroup, see https://github.com/phetsims/center-and-variability/issues/164 --- js/common/view/SceneView.ts | 3 --- ...adioButtonGroup.ts => SceneRadioButtonGroup.ts} | 11 +++++------ js/variability/view/VariabilityScreenView.ts | 14 +++++++------- 3 files changed, 12 insertions(+), 16 deletions(-) rename js/variability/view/{DistributionRadioButtonGroup.ts => SceneRadioButtonGroup.ts} (79%) diff --git a/js/common/view/SceneView.ts b/js/common/view/SceneView.ts index 427a2266..bd2cec42 100644 --- a/js/common/view/SceneView.ts +++ b/js/common/view/SceneView.ts @@ -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 { diff --git a/js/variability/view/DistributionRadioButtonGroup.ts b/js/variability/view/SceneRadioButtonGroup.ts similarity index 79% rename from js/variability/view/DistributionRadioButtonGroup.ts rename to js/variability/view/SceneRadioButtonGroup.ts index 83c2e6e1..edcb068f 100644 --- a/js/variability/view/DistributionRadioButtonGroup.ts +++ b/js/variability/view/SceneRadioButtonGroup.ts @@ -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 { +export default class SceneRadioButtonGroup extends RectangularRadioButtonGroup { - public constructor( property: Property, providedOptions: DistributionRadioButtonGroupOptions ) { - const options = optionize()( { + public constructor( property: Property, providedOptions: SceneRadioButtonGroupOptions ) { + const options = optionize()( { radioButtonOptions: { baseColor: 'white' } @@ -63,4 +62,4 @@ export default class DistributionRadioButtonGroup extends RectangularRadioButton } } -centerAndVariability.register( 'DistributionRadioButtonGroup', DistributionRadioButtonGroup ); \ No newline at end of file +centerAndVariability.register( 'SceneRadioButtonGroup', SceneRadioButtonGroup ); \ No newline at end of file diff --git a/js/variability/view/VariabilityScreenView.ts b/js/variability/view/VariabilityScreenView.ts index 05493fb8..0c8f6de7 100644 --- a/js/variability/view/VariabilityScreenView.ts +++ b/js/variability/view/VariabilityScreenView.ts @@ -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'; @@ -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 => {