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 9ebde2f commit 931472f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 23 deletions.
12 changes: 3 additions & 9 deletions js/charges-and-fields/view/ChargesAndFieldsToolboxPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,11 @@ import Vector2 from '../../../../dot/js/Vector2.js';
import Vector2Property from '../../../../dot/js/Vector2Property.js';
import { Shape } from '../../../../kite/js/imports.js';
import MeasuringTapeNode from '../../../../scenery-phet/js/MeasuringTapeNode.js';
import { Circle } from '../../../../scenery/js/imports.js';
import { Image } from '../../../../scenery/js/imports.js';
import { LayoutBox } from '../../../../scenery/js/imports.js';
import { Node } from '../../../../scenery/js/imports.js';
import { Path } from '../../../../scenery/js/imports.js';
import { Rectangle } from '../../../../scenery/js/imports.js';
import { Text } from '../../../../scenery/js/imports.js';
import { Circle, Image, Node, Path, Rectangle, Text, VBox } from '../../../../scenery/js/imports.js';
import Panel from '../../../../sun/js/Panel.js';
import electricPotentialPanelOutline_png from '../../../mipmaps/electricPotentialPanelOutline_png.js';
import chargesAndFieldsStrings from '../../chargesAndFieldsStrings.js';
import chargesAndFields from '../../chargesAndFields.js';
import chargesAndFieldsStrings from '../../chargesAndFieldsStrings.js';
import ChargesAndFieldsColors from '../ChargesAndFieldsColors.js';
import ChargesAndFieldsConstants from '../ChargesAndFieldsConstants.js';

Expand Down Expand Up @@ -57,7 +51,7 @@ class ChargesAndFieldsToolboxPanel extends Panel {
const measuringTapeIconNode = ChargesAndFieldsToolboxPanel.createMeasuringTapeIcon( tandem ); // {Node}

// The content panel with the two icons
const panelContent = new LayoutBox( {
const panelContent = new VBox( {
spacing: 20,
children: [ electricPotentialSensorIconNode, measuringTapeIconNode ],
pickable: true,
Expand Down
16 changes: 4 additions & 12 deletions js/charges-and-fields/view/ElectricPotentialSensorNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,10 @@ import { Shape } from '../../../../kite/js/imports.js';
import merge from '../../../../phet-core/js/merge.js';
import StringUtils from '../../../../phetcommon/js/util/StringUtils.js';
import EraserButton from '../../../../scenery-phet/js/buttons/EraserButton.js';
import { DragListener } from '../../../../scenery/js/imports.js';
import { Circle } from '../../../../scenery/js/imports.js';
import { Image } from '../../../../scenery/js/imports.js';
import { LayoutBox } from '../../../../scenery/js/imports.js';
import { Node } from '../../../../scenery/js/imports.js';
import { Path } from '../../../../scenery/js/imports.js';
import { Rectangle } from '../../../../scenery/js/imports.js';
import { Text } from '../../../../scenery/js/imports.js';
import { Circle, DragListener, HBox, Image, Node, Path, Rectangle, Text, VBox } from '../../../../scenery/js/imports.js';
import electricPotentialPanelOutline_png from '../../../mipmaps/electricPotentialPanelOutline_png.js';
import chargesAndFieldsStrings from '../../chargesAndFieldsStrings.js';
import chargesAndFields from '../../chargesAndFields.js';
import chargesAndFieldsStrings from '../../chargesAndFieldsStrings.js';
import ChargesAndFieldsColors from '../ChargesAndFieldsColors.js';
import ChargesAndFieldsConstants from '../ChargesAndFieldsConstants.js';
import PencilButton from './PencilButton.js';
Expand Down Expand Up @@ -139,8 +132,7 @@ class ElectricPotentialSensorNode extends Node {
} );

// The clear and plot buttons
const buttonsBox = new LayoutBox( {
orientation: 'horizontal',
const buttonsBox = new HBox( {
spacing: 10,
children: [ clearButton, plotElectricPotentialLineButton ],
pickable: true,
Expand All @@ -165,7 +157,7 @@ class ElectricPotentialSensorNode extends Node {
} );

// Organize the content of the control panel
const bodyContent = new LayoutBox( {
const bodyContent = new VBox( {
spacing: 7,
children: [ electricPotentialPanelTitleText, backgroundRectangle, buttonsBox ],
pickable: true
Expand Down
4 changes: 2 additions & 2 deletions js/charges-and-fields/view/GlobalOptionsNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

import OptionsDialog from '../../../../joist/js/OptionsDialog.js';
import ProjectorModeCheckbox from '../../../../joist/js/ProjectorModeCheckbox.js';
import { LayoutBox } from '../../../../scenery/js/imports.js';
import { VBox } from '../../../../scenery/js/imports.js';
import chargesAndFields from '../../chargesAndFields.js';

class GlobalOptionsNode extends LayoutBox {
class GlobalOptionsNode extends VBox {

/**
* @param {Tandem} tandem
Expand Down

1 comment on commit 931472f

@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.