Skip to content

Commit

Permalink
Adding more REVIEW comments #63
Browse files Browse the repository at this point in the history
  • Loading branch information
Denz1994 committed Aug 29, 2018
1 parent 0d26abc commit 10d2da4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions js/atomic/model/CoulombsLawAtomicModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ define( function( require ) {
var rightBoundary = ISLCConstants.RIGHT_OBJECT_BOUNDARY * 1E-11;

// @public - the position of the ruler in the model
// REVIEW: Doc type
this.rulerPositionProperty = new Property( new Vector2( 0, -0.75E-11 ), {
tandem: tandem.createTandem( 'rulerPositionProperty' ),
phetioType: PropertyIO( Vector2IO )
Expand Down
4 changes: 4 additions & 0 deletions js/atomic/view/CoulombsLawAtomicView.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ define( function( require ) {
tandem: tandem.createTandem( 'atomicLegendNode' )
} );

// REVIEW: Can we move this into the options at the initial declaration?
legendNode.left = this.layoutBounds.minX + 9.35;

this.addChild( legendNode );
Expand All @@ -140,12 +141,15 @@ define( function( require ) {
tandem: tandem.createTandem( 'picometerScaleString' )
} );

// REVIEW: Can we move this into the options at the initial declaration?
picometerScaleNode.left = legendNode.right + 10;

this.addChild( picometerScaleNode );

// a11y - charges are first in focus order
var charges = [ chargeNode1, chargeNode2 ];

// REVIEW: Visibility annotation? Doc type?
this.accessibleOrder = charges.concat( this.accessibleOrder );
}

Expand Down
4 changes: 4 additions & 0 deletions js/common/model/Charge.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ define( function( require ) {
constantRadius: 6.75E-3 // ensure this is in meters (0.675cm)
}, options );

// REVIEW: Consider using BooleanProperty
var constantRadiusProperty = new Property( true, {
tandem: tandem.createTandem( 'constantRadiusProperty' ),
phetioType: PropertyIO( BooleanIO )
Expand All @@ -50,6 +51,7 @@ define( function( require ) {
// @public - object node color is will change with value
// color property will be updated based on a boolean value (negative vs positive)
// brightness will be set according to the Mass/Charge magnitude
// REVIEW: Visibility annotation? Type Doc?
this.baseColorProperty = new DerivedProperty( [ this.valueProperty ], function( value ) {
var newBaseColor = value < 0 ? negativeColor : positiveColor;
return newBaseColor.colorUtilsBrighter( 1 - Math.abs( value ) / valueRange.max );
Expand All @@ -64,6 +66,8 @@ define( function( require ) {

// @override
// Returns the {number} radius of the charge object
// REVIEW: jsDoc should have @return {type}. Eliminates need for {number} in function description.
// REVIEW: Function description should be first in jsDoc.
calculateRadius: function( charge ) {
return this.radiusProperty.get();
},
Expand Down
2 changes: 2 additions & 0 deletions js/macro/view/CoulombsLawMacroView.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ define( function( require ) {
var charge1AbbreviatedString = require( 'string!COULOMBS_LAW/charge1Abbreviated' );
var charge2AbbreviatedString = require( 'string!COULOMBS_LAW/charge2Abbreviated' );
var unitsMacroLegendScaleString = require( 'string!COULOMBS_LAW/units.macroLegendScale' );

// REVIEW: Add microcoulombs to units section of MathSymbols.js
var unitsMicrocoulombsString = require( 'string!COULOMBS_LAW/units.microcoulombs' );

// constants
Expand Down

0 comments on commit 10d2da4

Please sign in to comment.