From 94f9b710e5e3ce185325a6a5835cc32a480539f6 Mon Sep 17 00:00:00 2001 From: Michael Barlow Date: Thu, 9 Nov 2017 09:28:17 -0700 Subject: [PATCH] remove baseColor argument from Charge constructor, see #33 --- js/atomic/model/CoulombsLawAtomicModel.js | 7 ++----- js/common/model/Charge.js | 3 +-- js/macro/model/CoulombsLawMacroModel.js | 7 ++----- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/js/atomic/model/CoulombsLawAtomicModel.js b/js/atomic/model/CoulombsLawAtomicModel.js index 074636b..c6a4e01 100644 --- a/js/atomic/model/CoulombsLawAtomicModel.js +++ b/js/atomic/model/CoulombsLawAtomicModel.js @@ -45,14 +45,11 @@ define( function( require ) { var valueRange = new Range( minChargeValue, maxChargeValue ); - var baseColor1 = new Color( '#00f' ); - var baseColor2 = new Color( '#f00' ); - - var charge1 = new Charge( chargeValue1, position1, valueRange, baseColor1, tandem, { + var charge1 = new Charge( chargeValue1, position1, valueRange, tandem, { constantRadius: 9.5E-13, tandemUnits: 'coulombs' } ); - var charge2 = new Charge( chargeValue2, position2, valueRange, baseColor2, tandem, { + var charge2 = new Charge( chargeValue2, position2, valueRange, tandem, { constantRadius: 9.5E-13, tandemUnits: 'coulombs' } ); diff --git a/js/common/model/Charge.js b/js/common/model/Charge.js index 3b14238..b997f74 100644 --- a/js/common/model/Charge.js +++ b/js/common/model/Charge.js @@ -24,12 +24,11 @@ define( function( require ) { /** * @param {number} initialCharge * @param {number} initialPosition - * @param {string} baseColor * @param {Tandem} tandem * @param {Object} options * @constructor */ - function Charge( initialCharge, initialPosition, valueRange, baseColor, tandem, options ) { + function Charge( initialCharge, initialPosition, valueRange, tandem, options ) { options = _.extend( { constantRadius: 6.75E-3 // ensure this is in meters (0.675cm) diff --git a/js/macro/model/CoulombsLawMacroModel.js b/js/macro/model/CoulombsLawMacroModel.js index 83c0b6e..a128601 100644 --- a/js/macro/model/CoulombsLawMacroModel.js +++ b/js/macro/model/CoulombsLawMacroModel.js @@ -39,11 +39,8 @@ define( function( require ) { var valueRange = new Range( minChargeValue, maxChargeValue ); - var baseColor1 = new Color( '#00f' ); - var baseColor2 = new Color( '#f00' ); - - var charge1 = new Charge( chargeValue1, position1, valueRange, baseColor1, tandem, { tandemUnits: 'coulombs' } ); - var charge2 = new Charge( chargeValue2, position2, valueRange, baseColor2, tandem, { tandemUnits: 'coulombs' } ); + var charge1 = new Charge( chargeValue1, position1, valueRange, tandem, { tandemUnits: 'coulombs' } ); + var charge2 = new Charge( chargeValue2, position2, valueRange, tandem, { tandemUnits: 'coulombs' } ); // boundary constants are in m, convert to cm var leftBoundary = ISLCConstants.LEFT_OBJECT_BOUNDARY * 1E-2;