From 004805a1cd765138b7bad30fc08d066e3c25f38b Mon Sep 17 00:00:00 2001 From: Michael Barlow Date: Wed, 9 Jan 2019 18:21:00 -0700 Subject: [PATCH] remove duplicate ChargeNode properties, add minimal describer initializations to pass asserts --- js/common/view/ChargeNode.js | 7 ------- js/macro/view/CoulombsLawMacroView.js | 9 +++++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/js/common/view/ChargeNode.js b/js/common/view/ChargeNode.js index 2f7d34f..dc1ecb8 100644 --- a/js/common/view/ChargeNode.js +++ b/js/common/view/ChargeNode.js @@ -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; @@ -86,7 +80,6 @@ define( function( require ) { model, chargeObjectModel, layoutBounds, - null, modelViewTransform, pullForceRange, options diff --git a/js/macro/view/CoulombsLawMacroView.js b/js/macro/view/CoulombsLawMacroView.js index 1e64a19..9368be9 100644 --- a/js/macro/view/CoulombsLawMacroView.js +++ b/js/macro/view/CoulombsLawMacroView.js @@ -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' ); @@ -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