From b27da41c71d9c35103b9f1216102adf338fdd4e6 Mon Sep 17 00:00:00 2001 From: zepumph Date: Tue, 18 Jun 2019 16:06:56 -0800 Subject: [PATCH] move focusListener to MassNode, add code review item, refactor children of playArea/controlArea, https://github.com/phetsims/gravity-force-lab-basics/issues/134 --- .../view/GravityForceLabScreenSummaryNode.js | 7 ++++--- js/gravity-force-lab/view/MassNode.js | 6 ++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/js/gravity-force-lab/view/GravityForceLabScreenSummaryNode.js b/js/gravity-force-lab/view/GravityForceLabScreenSummaryNode.js index 210efe88..c30619c4 100644 --- a/js/gravity-force-lab/view/GravityForceLabScreenSummaryNode.js +++ b/js/gravity-force-lab/view/GravityForceLabScreenSummaryNode.js @@ -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} @@ -104,7 +104,8 @@ define( require => { mainSummaryDescriptionNode, secondSummaryDescriptionNode, simStateNode, - interactionHintNode ]; + interactionHintNode + ]; Property.multilink( [ model.forceProperty, model.forceValuesProperty ], () => { this.updateForceVectorSummary(); diff --git a/js/gravity-force-lab/view/MassNode.js b/js/gravity-force-lab/view/MassNode.js index eb5c1cef..70bfb7c1 100644 --- a/js/gravity-force-lab/view/MassNode.js +++ b/js/gravity-force-lab/view/MassNode.js @@ -65,6 +65,12 @@ define( require => { this.touchArea = this.mouseArea; } ); + this.addInputListener( { + focus: () => { + positionDescriber.lastMoveCloser = null; + } + } ); + options.finishWiringListeners(); }