Skip to content

Commit

Permalink
fix positioning of control panel and checkbox group, #304
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Mar 22, 2023
1 parent 5e6ca3d commit d589c69
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/common/view/CalculusGrapherScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ export default class CalculusGrapherScreenView extends ScreenView {
tandem: options.tandem.createTandem( 'graphsNode' )
} );

// Put control panel in the negative space to the right of graphsNode, top-aligned with graphsNode.y.
// Put control panel in the negative space to the right of the ChartRectangles, top-aligned with graphsNode.y.
rightVBox.boundsProperty.link( () => {
rightVBox.centerX = this.layoutBounds.right - ( this.layoutBounds.right - this.graphsNode.right ) / 2;
const chartRectangleRight = this.graphsNode.x + CalculusGrapherConstants.CHART_RECTANGLE_WIDTH;
rightVBox.centerX = this.layoutBounds.right - ( this.layoutBounds.right - chartRectangleRight ) / 2;
rightVBox.top = this.graphsNode.y;
} );

Expand Down

0 comments on commit d589c69

Please sign in to comment.