Skip to content

Commit

Permalink
deprecate LayoutBox, phetsims/scenery#1418
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed May 31, 2022
1 parent ce920be commit 8258373
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/discrete/view/DiscreteControlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ class DiscreteControlPanel extends Panel {
tandem: Tandem.REQUIRED
}, options );

const fourierSeriesLayoutBox = new FourierSeriesSubpanel( model.fourierSeries, model.waveformProperty, popupParent, {
const fourierSeriesSubpanel = new FourierSeriesSubpanel( model.fourierSeries, model.waveformProperty, popupParent, {
tandem: options.tandem.createTandem( 'fourierSeriesSubpanel' )
} );

// {Node[]} logical sections of the control panel
const sectionNodes = [
fourierSeriesLayoutBox,
fourierSeriesSubpanel,
new GraphControlsSubpanel( model.domainProperty, model.seriesTypeProperty, model.equationFormProperty, popupParent, {
tandem: options.tandem.createTandem( 'graphControlsSubpanel' )
} ),
Expand All @@ -87,7 +87,7 @@ class DiscreteControlPanel extends Panel {

// Put a separator between each logical section.
// Use a uniform separator width, sized to fit the widest section
const separatorWidth = _.maxBy( sectionNodes, layoutBox => layoutBox.width ).width;
const separatorWidth = _.maxBy( sectionNodes, node => node.width ).width;
const separatorOptions = {
stroke: FMWColors.separatorStrokeProperty
};
Expand Down Expand Up @@ -123,7 +123,7 @@ class DiscreteControlPanel extends Panel {

// InfoButton at upper-right of control panel, vertically centered on title.
infoButton.right = vBox.right;
infoButton.centerY = fourierSeriesLayoutBox.fourierSeriesText.boundsTo( vBox ).centerY;
infoButton.centerY = fourierSeriesSubpanel.fourierSeriesText.boundsTo( vBox ).centerY;

super( content, options );

Expand Down

1 comment on commit 8258373

@pixelzoom
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.