Skip to content

Commit

Permalink
constrain ruler to above controls, #104
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Nov 18, 2019
1 parent 21457e6 commit e7ef863
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions js/gravity-force-lab/view/GravityForceLabScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,10 @@ define( require => {
modelViewTransform, rulerRegionPositions, positionDescriber );

// ruler drag bounds (in model coordinate frame) - assumes a single point scale inverted Y mapping
const halfModelHeight = modelViewTransform.viewToModelDeltaY( this.layoutBounds.height / 2 );
const minX = model.leftObjectBoundary;
const minY = halfModelHeight; // bottom bound because Y is inverted
const minY = modelViewTransform.viewToModelY( massControl2.top + 10 ); // bottom bound because Y is inverted
const maxX = model.rightObjectBoundary;
const maxY = -halfModelHeight; // top bound because Y is inverted
const maxY = -modelViewTransform.viewToModelDeltaY( this.layoutBounds.height / 2 ); // top bound because Y is inverted

// @private - added to object for animation stepping
const gravityForceLabRuler = new ISLCRulerNode(
Expand Down

0 comments on commit e7ef863

Please sign in to comment.