Skip to content

Commit

Permalink
remove baseColor argument from Charge constructor, see #33
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarlow12 committed Nov 9, 2017
1 parent ddba9d5 commit 94f9b71
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
7 changes: 2 additions & 5 deletions js/atomic/model/CoulombsLawAtomicModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
} );
Expand Down
3 changes: 1 addition & 2 deletions js/common/model/Charge.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 2 additions & 5 deletions js/macro/model/CoulombsLawMacroModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 94f9b71

Please sign in to comment.