diff --git a/js/atomic/view/CoulombsLawAtomicView.js b/js/atomic/view/CoulombsLawAtomicView.js index a92f34d..a712b41 100644 --- a/js/atomic/view/CoulombsLawAtomicView.js +++ b/js/atomic/view/CoulombsLawAtomicView.js @@ -57,7 +57,6 @@ define( function( require ) { coulombsLawModel.object1, this.layoutBounds, this.modelViewTransform, - tandem.createTandem( 'chargeNode1' ), { label: charge1AbbreviatedString, otherObjectLabel: charge2AbbreviatedString, @@ -67,7 +66,8 @@ define( function( require ) { atomicScale: true, maxArrowWidth: ARROW_MAX_WIDTH, pullRangeMultiplier: PULL_RANGE_MULTIPLIER, - forceReadoutDecimalPlaces: 9 + forceReadoutDecimalPlaces: 9, + tandem: tandem.createTandem( 'chargeNode1' ) } ); var chargeNode2 = new ChargeNode( @@ -75,7 +75,6 @@ define( function( require ) { coulombsLawModel.object2, this.layoutBounds, this.modelViewTransform, - tandem.createTandem( 'chargeNode2' ), { label: charge2AbbreviatedString, otherObjectLabel: charge1AbbreviatedString, @@ -85,7 +84,8 @@ define( function( require ) { atomicScale: true, maxArrowWidth: ARROW_MAX_WIDTH, pullRangeMultiplier: PULL_RANGE_MULTIPLIER, - forceReadoutDecimalPlaces: 9 + forceReadoutDecimalPlaces: 9, + tandem: tandem.createTandem( 'chargeNode2' ) } ); // charge nodes and arrows are added to the bottom of the scene graph so that the ruler will appear above them yet diff --git a/js/common/view/ChargeNode.js b/js/common/view/ChargeNode.js index b414655..82bf9fd 100644 --- a/js/common/view/ChargeNode.js +++ b/js/common/view/ChargeNode.js @@ -2,8 +2,7 @@ /** * Scenery node for the charge object. Children include the pusher/pullers, the circular charge, the force arrow, and - * all labels. Most instantiation details are handled in ISLCObjectNode including all property linking and drawing. - // REVIEW: Use Property instead of property in above comment + * all labels. Most instantiation details are handled in ISLCObjectNode including all Property linking and drawing. * * @author Jesse Greenberg (PhET Interactive Simulations) * @author Michael Barlow (PhET Interactive Simulations) @@ -17,9 +16,10 @@ define( function( require ) { var coulombsLaw = require( 'COULOMBS_LAW/coulombsLaw' ); var CoulombsLawColorProfile = require( 'COULOMBS_LAW/common/CoulombsLawColorProfile' ); var inherit = require( 'PHET_CORE/inherit' ); - var RangeWithValue = require('DOT/RangeWithValue'); - var RadialGradient = require( 'SCENERY/util/RadialGradient' ); var ISLCObjectNode = require('INVERSE_SQUARE_LAW_COMMON/view/ISLCObjectNode'); + var RangeWithValue = require('DOT/RangeWithValue'); + var RadialGradient = require( 'SCENERY/util/RadialGradient' ); + var Tandem = require( 'TANDEM/Tandem' ); // constants var ISLCConstants = require( 'INVERSE_SQUARE_LAW_COMMON/ISLCConstants' ); @@ -30,11 +30,10 @@ define( function( require ) { * @param {Charge} chargeObjectModel * @param {Bounds2} layoutBounds * @param {ModelViewTransform2} modelViewTransform - * @param {Tandem} tandem // TODO: move to options // REVIEW: Handle todo * @param {Object} options * @constructor */ - function ChargeNode( model, chargeObjectModel, layoutBounds, modelViewTransform, tandem, options ) { + function ChargeNode( model, chargeObjectModel, layoutBounds, modelViewTransform, options ) { var forceConstant = ISLCConstants.k; @@ -57,7 +56,7 @@ define( function( require ) { arrowStroke: CoulombsLawColorProfile.forceArrowStrokeProperty, labelShadowFill: CoulombsLawColorProfile.labelShadowFillProperty, - tandem: tandem.createTandem( 'chargeNode1' ) + tandem: Tandem.required }, options ); // @private @@ -77,8 +76,8 @@ define( function( require ) { // function that determines the current puller image to represent var pullForceRange = new RangeWithValue( minForce, maxForce ); - - ISLCObjectNode.call( + + ISLCObjectNode.call( this, model, chargeObjectModel, diff --git a/js/coulombs-law-main.js b/js/coulombs-law-main.js index e74b785..5ba284d 100644 --- a/js/coulombs-law-main.js +++ b/js/coulombs-law-main.js @@ -3,9 +3,10 @@ /** * Main entry point for the sim. * - * @author $AUTHOR$ + * @author Michael Barlow (PhET Interactive Simulations) + * @author Jesse Greenberg (PhET Interactive Simulations) */ -// REVIEW: Update @author + define( function( require ) { 'use strict'; diff --git a/js/macro/view/CoulombsLawMacroView.js b/js/macro/view/CoulombsLawMacroView.js index 291e050..7e522fa 100644 --- a/js/macro/view/CoulombsLawMacroView.js +++ b/js/macro/view/CoulombsLawMacroView.js @@ -44,34 +44,34 @@ define( function( require ) { CoulombsLawCommonView.call( this, coulombsLawModel, SCALE_FACTOR, unitsMicrocoulombsString, MODEL_VIEW_TRANSFORM_SCALE, rulerOptions, tandem ); // charge nodes added in each screen to allow for different decimal precision and arrow height - var chargeNode1 = new ChargeNode( - coulombsLawModel, - coulombsLawModel.object1, - this.layoutBounds, + var chargeNode1 = new ChargeNode( + coulombsLawModel, + coulombsLawModel.object1, + this.layoutBounds, this.modelViewTransform, - tandem.createTandem( 'chargeNode1' ), { label: charge1AbbreviatedString, otherObjectLabel: charge2AbbreviatedString, defaultDirection: 'left', arrowColor: '#66f', forceArrowHeight: 70, - forceReadoutDecimalPlaces: 3 + forceReadoutDecimalPlaces: 3, + tandem: tandem.createTandem( 'chargeNode1' ) } ); - var chargeNode2 = new ChargeNode( - coulombsLawModel, - coulombsLawModel.object2, - this.layoutBounds, + var chargeNode2 = new ChargeNode( + coulombsLawModel, + coulombsLawModel.object2, + this.layoutBounds, this.modelViewTransform, - tandem.createTandem( 'chargeNode2' ), { label: charge2AbbreviatedString, otherObjectLabel: charge1AbbreviatedString, defaultDirection: 'right', arrowColor: '#f66', forceArrowHeight: 120, - forceReadoutDecimalPlaces: 3 + forceReadoutDecimalPlaces: 3, + tandem: tandem.createTandem( 'chargeNode2' ) } ); // charge nodes and arrows are added to the bottom of the scene graph so that the ruler will appear above them yet @@ -87,13 +87,13 @@ define( function( require ) { // create a line the length of 1 cm var legendNodeLineLength = this.modelViewTransform.modelToViewDeltaX( 1E-2 ); - var legendNode = new ISLCLegendNode( + var legendNode = new ISLCLegendNode( legendNodeLineLength, // length of the line unitsMacroLegendScaleString, // unit string { fill: CoulombsLawColorProfile.legendNodeFillProperty, bottom: this.layoutBounds.maxY - 10, - tandem: tandem.createTandem( 'legendNode' ) + tandem: tandem.createTandem( 'legendNode' ) } ); // REVIEW: Pass into options for legendNode.