From 1e421a5aa8c9b696ea644e31473557751d76f924 Mon Sep 17 00:00:00 2001 From: Sam Reid Date: Wed, 10 May 2023 07:31:52 -0600 Subject: [PATCH] Rename MedianPlotNode => MeanAndMedianPlotNode, see https://github.com/phetsims/center-and-variability/issues/170 --- js/mean-and-median/view/MeanAndMedianAccordionBox.ts | 11 +++++------ .../{MedianPlotNode.ts => MeanAndMedianPlotNode.ts} | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) rename js/mean-and-median/view/{MedianPlotNode.ts => MeanAndMedianPlotNode.ts} (96%) diff --git a/js/mean-and-median/view/MeanAndMedianAccordionBox.ts b/js/mean-and-median/view/MeanAndMedianAccordionBox.ts index 5b52fd70..20d710b6 100644 --- a/js/mean-and-median/view/MeanAndMedianAccordionBox.ts +++ b/js/mean-and-median/view/MeanAndMedianAccordionBox.ts @@ -8,7 +8,7 @@ import Bounds2 from '../../../../dot/js/Bounds2.js'; import Tandem from '../../../../tandem/js/Tandem.js'; import centerAndVariability from '../../centerAndVariability.js'; import MeanAndMedianModel from '../model/MeanAndMedianModel.js'; -import MedianPlotNode from './MedianPlotNode.js'; +import MeanAndMedianPlotNode from './MeanAndMedianPlotNode.js'; import TopRepresentationCheckboxGroup from '../../common/view/TopRepresentationCheckboxGroup.js'; import VerticalCheckboxGroup from '../../../../sun/js/VerticalCheckboxGroup.js'; import CAVConstants from '../../common/CAVConstants.js'; @@ -16,7 +16,7 @@ import CAVConstants from '../../common/CAVConstants.js'; const MARGIN = 12.5; export default class MeanAndMedianAccordionBox extends CAVAccordionBox { - private readonly medianPlotNode: MedianPlotNode; + private readonly medianPlotNode: MeanAndMedianPlotNode; public constructor( model: MeanAndMedianModel, layoutBounds: Bounds2, tandem: Tandem, top: number, playAreaNumberLineNode: Node ) { const iconGroup = new AlignGroup(); @@ -30,8 +30,7 @@ export default class MeanAndMedianAccordionBox extends CAVAccordionBox { // There is only one scene in the mean and median screen const sceneModel = model.selectedSceneModelProperty.value; - // TODO: https://github.com/phetsims/center-and-variability/issues/170 Why is this called the MedianPlotNode? - const medianPlotNode = new MedianPlotNode( model, sceneModel, { + const meanAndMedianPlotNode = new MeanAndMedianPlotNode( model, sceneModel, { tandem: tandem.createTandem( 'plotNode' ) } ).mutate( { bottom: backgroundNode.height @@ -47,7 +46,7 @@ export default class MeanAndMedianAccordionBox extends CAVAccordionBox { } ); backgroundNode.addChild( checkboxGroup ); - backgroundNode.addChild( medianPlotNode ); + backgroundNode.addChild( meanAndMedianPlotNode ); super( backgroundNode, { titleNode: new Text( CenterAndVariabilityStrings.distanceInMetersStringProperty, { @@ -60,7 +59,7 @@ export default class MeanAndMedianAccordionBox extends CAVAccordionBox { } ); - this.medianPlotNode = medianPlotNode; + this.medianPlotNode = meanAndMedianPlotNode; } public alignWithPlayAreaNumberLineNode( x: number ): void { diff --git a/js/mean-and-median/view/MedianPlotNode.ts b/js/mean-and-median/view/MeanAndMedianPlotNode.ts similarity index 96% rename from js/mean-and-median/view/MedianPlotNode.ts rename to js/mean-and-median/view/MeanAndMedianPlotNode.ts index 5406e5b0..ce8e8f20 100644 --- a/js/mean-and-median/view/MedianPlotNode.ts +++ b/js/mean-and-median/view/MeanAndMedianPlotNode.ts @@ -22,7 +22,7 @@ export type CAVPlotOptions = NodeOptions & PickRequired; // Prevent the median bar node from going off the top of the accordion box const MARGIN_TO_TOP_OF_ACCORDION_BOX = 4; -export default class MedianPlotNode extends CAVPlotNode { +export default class MeanAndMedianPlotNode extends CAVPlotNode { private readonly medianBarNode = new MedianBarNode( { notchDirection: 'down', @@ -80,4 +80,4 @@ export default class MedianPlotNode extends CAVPlotNode { } } -centerAndVariability.register( 'MedianPlotNode', MedianPlotNode ); \ No newline at end of file +centerAndVariability.register( 'MeanAndMedianPlotNode', MeanAndMedianPlotNode ); \ No newline at end of file