Skip to content

Commit

Permalink
move focusListener to MassNode, add code review item, refactor childr…
Browse files Browse the repository at this point in the history
…en of playArea/controlArea, phetsims/gravity-force-lab-basics#134
  • Loading branch information
zepumph committed Jun 19, 2019
1 parent 6dc2ad4 commit b27da41
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/gravity-force-lab/view/GravityForceLabScreenSummaryNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ define( require => {

options = _.extend( {

// {{Property[]}} - a way to provide extra Properties to that will update the mass and distance summary sections
// {Property[]} - a way to provide extra Properties to that will update the mass and distance summary sections
// on change
additionalMassDistanceProperties: [],

// {string}
mainDescriptionContent: screenSummaryMainDescriptionString,

// {sring}
// {string}
secondaryDescriptionContent: screenSummarySecondaryDescriptionString,

// {string}
Expand Down Expand Up @@ -104,7 +104,8 @@ define( require => {
mainSummaryDescriptionNode,
secondSummaryDescriptionNode,
simStateNode,
interactionHintNode ];
interactionHintNode
];

Property.multilink( [ model.forceProperty, model.forceValuesProperty ], () => {
this.updateForceVectorSummary();
Expand Down
6 changes: 6 additions & 0 deletions js/gravity-force-lab/view/MassNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ define( require => {
this.touchArea = this.mouseArea;
} );

this.addInputListener( {
focus: () => {
positionDescriber.lastMoveCloser = null;
}
} );

options.finishWiringListeners();
}

Expand Down

0 comments on commit b27da41

Please sign in to comment.