Skip to content

Commit

Permalink
Reviewed variable names, see #64
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Feb 7, 2018
1 parent 8f49e7c commit 9773e12
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions js/friction/model/FrictionModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ define( function( require ) {
this.newStepProperty = new Property( false );

// @public - drag and drop book coordinates conversion coefficient
this.dndScale = 0.025;
this.dndScale = 0.025; // TODO: better name

// check atom's contact
this.distanceProperty.link( function( distance ) {
Expand Down Expand Up @@ -282,7 +282,7 @@ define( function( require ) {
this.atomRowsToEvaporateProperty.set( this.toEvaporate.length );

// set min vertical position
this.minYPos = MIN_Y_POSITION;
this.minYPos = MIN_Y_POSITION; // TODO: better name
},

/**
Expand Down
2 changes: 2 additions & 0 deletions js/friction/view/FrictionKeyboardHelpContentPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ define( function( require ) {
var Panel = require( 'SUN/Panel' );
var RichText = require( 'SCENERY/nodes/RichText' );

// strings
var moveBookHeaderString = require( 'string!FRICTION/moveBookHeader' );
var moveBookString = require( 'string!FRICTION/moveBook' );
var moveInSmallerStepsString = require( 'string!FRICTION/moveInSmallerSteps' );

// constants
var DEFAULT_LABEL_OPTIONS = {
font: HelpContent.DEFAULT_LABEL_FONT,
maxWidth: HelpContent.DEFAULT_TEXT_MAX_WIDTH
Expand Down
2 changes: 1 addition & 1 deletion js/friction/view/magnifier/AtomNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ define( function( require ) {
this.isEvaporated = false;
this.currentX = 0;
this.currentY = 0;
this.x0 = options.x;
this.x0 = options.x; // TODO: is this variable used elsewhere? Does it need a better name?
this.y0 = options.y;
this.model = model;
this.options = options;
Expand Down
4 changes: 2 additions & 2 deletions js/friction/view/magnifier/MagnifierNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ define( function( require ) {
var ARROW_LENGTH = 70;
var INTER_ARROW_SPACING = 20;
var ARROW_OPTIONS = {

// These values were empirically determined based on visual appearance.
headHeight: 32,
headWidth: 30,
Expand Down Expand Up @@ -90,9 +91,8 @@ define( function( require ) {
this.param.topAtoms.y = this.param.height / 3 - model.atoms.distance;
this.param.bottomAtoms.y = 2 * this.param.height / 3;


// add container for clipping
this.addChild( this.container = new Node() );
this.addChild( this.container = new Node() ); // TODO: do not assign value in expression

// add container where the individual atoms will be placed
this.bottomAtomsLayer = new Node();
Expand Down
5 changes: 3 additions & 2 deletions js/friction/view/magnifier/MagnifierTargetNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
*/
define( function( require ) {
'use strict';

// modules
var inherit = require( 'PHET_CORE/inherit' );
var Node = require( 'SCENERY/nodes/Node' );

var friction = require( 'FRICTION/friction' );
var Path = require( 'SCENERY/nodes/Path' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
Expand Down Expand Up @@ -39,7 +40,7 @@ define( function( require ) {
this.leftAnchor = leftAnchor;
this.rightAnchor = rightAnchor;

this.magRect = new Rectangle( 0, 0, width, height, round, round, { stroke: options.stroke, lineWidth: 1 } );
this.magRect = new Rectangle( 0, 0, width, height, round, round, { stroke: options.stroke, lineWidth: 1 } ); // TODO: rename var
this.addChild( this.magRect );
this.pathLeft = new Path( new Shape(), { stroke: options.stroke, lineDash: [ 10, 10 ] } );
this.addChild( this.pathLeft );
Expand Down

0 comments on commit 9773e12

Please sign in to comment.