Skip to content

Commit

Permalink
remove duplicate ChargeNode properties, add minimal describer initial…
Browse files Browse the repository at this point in the history
…izations to pass asserts
  • Loading branch information
mbarlow12 committed Jan 10, 2019
1 parent 07d5366 commit 004805a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
7 changes: 0 additions & 7 deletions js/common/view/ChargeNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ define( function( require ) {
}
}, options );

// @private
this.modelViewTransform = modelViewTransform;
this.model = model;
this.objectModel = chargeObjectModel;
this.layoutBounds = layoutBounds;

// @private - Used for incrementing the radius to prevent division by zero in RadialGradient
this.snapToNearest = options.snapToNearest;

Expand All @@ -86,7 +80,6 @@ define( function( require ) {
model,
chargeObjectModel,
layoutBounds,
null,
modelViewTransform,
pullForceRange,
options
Expand Down
9 changes: 9 additions & 0 deletions js/macro/view/CoulombsLawMacroView.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ define( function( require ) {
var coulombsLaw = require( 'COULOMBS_LAW/coulombsLaw' );
var CoulombsLawColorProfile = require( 'COULOMBS_LAW/common/CoulombsLawColorProfile' );
var CoulombsLawCommonView = require( 'COULOMBS_LAW/common/view/CoulombsLawCommonView' );
var ForceDescriber = require( 'INVERSE_SQUARE_LAW_COMMON/view/describers/ForceDescriber' );
var ISLCAlertManager = require( 'INVERSE_SQUARE_LAW_COMMON/view/ISLCAlertManager' );
var PositionDescriber = require( 'INVERSE_SQUARE_LAW_COMMON/view/describers/PositionDescriber' );
var inherit = require( 'PHET_CORE/inherit' );
var ISLCLegendNode = require( 'INVERSE_SQUARE_LAW_COMMON/view/ISLCLegendNode' );

Expand All @@ -40,6 +43,12 @@ define( function( require ) {
snapToNearest: 0.001 // in model coordinates
};


// TODO: convert to CL-specific types, only here to pass CT
PositionDescriber.initialize( new PositionDescriber( coulombsLawModel, 'label1', 'label2' ) );
ForceDescriber.initialize( new ForceDescriber( coulombsLawModel, 'label1', 'label2' ) );
ISLCAlertManager.initialize( new ISLCAlertManager( coulombsLawModel ) );

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
Expand Down

0 comments on commit 004805a

Please sign in to comment.