Skip to content

Commit

Permalink
add space between labels and flux arrows, see #188
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet committed Sep 10, 2022
1 parent 4cc60ae commit 80cd0ac
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions js/common/view/FluxMeterNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class FluxMeterNode extends Node {
infraredString,
GreenhouseEffectConstants.INFRARED_COLOR
);
const arrows = new HBox( { children: [ sunlightDisplayArrow, infraredDisplayArrow ], spacing: METER_SPACING } );
const fluxArrows = new HBox( { children: [ sunlightDisplayArrow, infraredDisplayArrow ], spacing: METER_SPACING } );

const zoomButtons = new MagnifyingGlassZoomButtonGroup( this.zoomFactor, {
spacing: 5,
Expand All @@ -177,7 +177,7 @@ class FluxMeterNode extends Node {
} );

// zoom buttons conditionally added to the view, but always created because I think that is required for PhET-iO
const contentChildren = [ titleText, arrows ];
const contentChildren = [ titleText, fluxArrows ];
options.includeZoomButtons && contentChildren.push( zoomButtons );
const content = new VBox( { children: contentChildren, spacing: METER_SPACING } );

Expand Down Expand Up @@ -317,7 +317,7 @@ class EnergyFluxDisplay extends Node {
providedOptions?: EnergyFluxDisplayOptions ) {

const options = optionize<EnergyFluxDisplayOptions, EnergyFluxDisplayArrowSelfOptions, NodeOptions>()( {
height: 355,
height: 340,
arrowNodeOptions: {
headHeight: 16,
headWidth: 16,
Expand Down Expand Up @@ -426,7 +426,8 @@ class EnergyFluxDisplay extends Node {
} );

// layout
boundsRectangle.centerTop = labelText.centerBottom;
boundsRectangle.centerX = labelText.centerX;
boundsRectangle.top = labelText.bottom + 15;
}
}

Expand Down

0 comments on commit 80cd0ac

Please sign in to comment.