Skip to content

Commit 93dc5da

Browse files
pixelzoomjessegreenberg
authored andcommitted
rename RectangularRadioButtonGroup, phetsims/sun#650
1 parent 0765248 commit 93dc5da

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

js/moleculesandlight/view/MoleculeSelectionPanel.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import PhetFont from '../../../../scenery-phet/js/PhetFont.js';
1515
import FocusHighlightPath from '../../../../scenery/js/accessibility/FocusHighlightPath.js';
1616
import Rectangle from '../../../../scenery/js/nodes/Rectangle.js';
1717
import RichText from '../../../../scenery/js/nodes/RichText.js';
18-
import RadioButtonGroup from '../../../../sun/js/buttons/RadioButtonGroup.js';
18+
import RectangularRadioButtonGroup from '../../../../sun/js/buttons/RectangularRadioButtonGroup.js';
1919
import Panel from '../../../../sun/js/Panel.js';
2020
import moleculesAndLight from '../../moleculesAndLight.js';
2121
import moleculesAndLightStrings from '../../moleculesAndLightStrings.js';
@@ -134,7 +134,7 @@ class MoleculeSelectionPanel extends Panel {
134134
_.each( textList, function( text ) { text.scale( scaleFactor ); } );
135135
}
136136

137-
const radioButtons = new RadioButtonGroup( model.photonTargetProperty, radioButtonContent, {
137+
const radioButtonGroup = new RectangularRadioButtonGroup( model.photonTargetProperty, radioButtonContent, {
138138
spacing: 1.75,
139139
baseColor: 'black',
140140
buttonContentXMargin: 0,
@@ -153,14 +153,14 @@ class MoleculeSelectionPanel extends Panel {
153153
} );
154154

155155
// custom group focus highlight so there is enough spacing between button highlight and group highlight
156-
const groupCoefficient = FocusHighlightPath.getGroupDilationCoefficient( radioButtons ) + HIGHLIGHT_DILATION;
157-
radioButtons.groupFocusHighlight = new FocusHighlightPath( Shape.bounds( radioButtons.bounds.dilated( groupCoefficient ) ), {
156+
const groupCoefficient = FocusHighlightPath.getGroupDilationCoefficient( radioButtonGroup ) + HIGHLIGHT_DILATION;
157+
radioButtonGroup.groupFocusHighlight = new FocusHighlightPath( Shape.bounds( radioButtonGroup.bounds.dilated( groupCoefficient ) ), {
158158
outerLineWidth: FocusHighlightPath.GROUP_OUTER_LINE_WIDTH,
159159
innerLineWidth: FocusHighlightPath.GROUP_INNER_LINE_WIDTH,
160160
innerStroke: FocusHighlightPath.FOCUS_COLOR
161161
} );
162162

163-
super( radioButtons, {
163+
super( radioButtonGroup, {
164164
fill: 'black',
165165
tandem: tandem,
166166
tagName: 'div',

js/moleculesandlight/view/QuadEmissionFrequencyControlPanel.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import Image from '../../../../scenery/js/nodes/Image.js';
1818
import LayoutBox from '../../../../scenery/js/nodes/LayoutBox.js';
1919
import Node from '../../../../scenery/js/nodes/Node.js';
2020
import Text from '../../../../scenery/js/nodes/Text.js';
21-
import RadioButtonGroup from '../../../../sun/js/buttons/RadioButtonGroup.js';
21+
import RectangularRadioButtonGroup from '../../../../sun/js/buttons/RectangularRadioButtonGroup.js';
2222
import multiSelectionSoundPlayerFactory from '../../../../tambo/js/multiSelectionSoundPlayerFactory.js';
2323
import Tandem from '../../../../tandem/js/Tandem.js';
2424
import flashlight2Image from '../../../mipmaps/flashlight_png.js';
@@ -165,7 +165,7 @@ function QuadEmissionFrequencyControlPanel( photonAbsorptionModel, tandem ) {
165165
);
166166
} );
167167

168-
const radioButtons = new RadioButtonGroup( photonAbsorptionModel.photonWavelengthProperty, radioButtonContent, {
168+
const radioButtonGroup = new RectangularRadioButtonGroup( photonAbsorptionModel.photonWavelengthProperty, radioButtonContent, {
169169
orientation: 'horizontal',
170170
spacing: 15,
171171
baseColor: 'black',
@@ -196,12 +196,12 @@ function QuadEmissionFrequencyControlPanel( photonAbsorptionModel, tandem ) {
196196
}
197197

198198
// Set the positions of all components of the control panel.
199-
energyArrow.centerX = energyText.centerX = radioButtons.centerX; // All have the same center x component.
200-
energyArrow.top = radioButtons.bottom + 15; // Arrow is below the buttons by an offset which is chosen empirically.
199+
energyArrow.centerX = energyText.centerX = radioButtonGroup.centerX; // All have the same center x component.
200+
energyArrow.top = radioButtonGroup.bottom + 15; // Arrow is below the buttons by an offset which is chosen empirically.
201201
energyText.top = energyArrow.bottom;
202202

203203
// Add all components to the control panel.
204-
this.addChild( radioButtons );
204+
this.addChild( radioButtonGroup );
205205
this.addChild( energyArrow );
206206
this.addChild( energyText );
207207

0 commit comments

Comments
 (0)