Skip to content

Commit

Permalink
options renaming, common options moved to MassNode, part of ISLCObjec…
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarlow12 committed Nov 27, 2017
1 parent 734d0cf commit 2f08d35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
10 changes: 0 additions & 10 deletions js/gravity-force-lab/view/GravityForceLabScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ define( function( require ) {

// constants
var CONSTANT_MASS_COLOR = new Color( 'indigo' );
var MASS_NODE_Y_POSITION = 185;
var CONTROL_SCALE = 0.72;
var SHOW_GRID = ISLQueryParameters.showGrid;
var SHOW_MOCKUP = ISLQueryParameters.showMockup;
var ARROW_LABEL_COLOR_STRING = '#000';

/**
* @param {GravityForceLabModel} model
Expand Down Expand Up @@ -78,14 +76,10 @@ define( function( require ) {
modelViewTransform,
tandem.createTandem( 'mass1Node' ),
{
title: mass1String,
label: mass1AbbreviatedString,
otherObjectLabel: mass2AbbreviatedString,
defaultDirection: 'left',
arrowColor: '#66f',
arrowFill: ARROW_LABEL_COLOR_STRING,
arrowLabelFill: ARROW_LABEL_COLOR_STRING,
y: MASS_NODE_Y_POSITION,
forceArrowHeight: 85
}
);
Expand All @@ -97,14 +91,10 @@ define( function( require ) {
modelViewTransform,
tandem.createTandem( 'mass2Node' ),
{
title: mass2String,
label: mass2AbbreviatedString,
otherObjectLabel: mass1AbbreviatedString,
defaultDirection: 'right',
arrowColor: '#f66',
arrowFill: ARROW_LABEL_COLOR_STRING,
arrowLabelFill: ARROW_LABEL_COLOR_STRING,
y: MASS_NODE_Y_POSITION,
forceArrowHeight: 135
}
);
Expand Down
10 changes: 8 additions & 2 deletions js/gravity-force-lab/view/MassNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ define( function( require ) {

// constants
var pullForceRange = new RangeWithValue( ( 0.5e-10 ), ( 1.1e-6 ) ); // empirically determined for linear mapping of pull objects
var ARROW_LABEL_COLOR_STRING = '#000';
var MASS_NODE_Y_POSITION = 185;

/**
* @param {GravityForceLabModel} model
Expand All @@ -34,8 +36,12 @@ define( function( require ) {

options = _.extend( {
label: 'This Mass',
otherMassName: 'Other Mass',
snapToNearest: GravityForceLabConstants.LOCATION_SNAP_VALUE
otherObjectLabel: 'Other Mass',
arrowFill: ARROW_LABEL_COLOR_STRING,
arrowLabelFill: ARROW_LABEL_COLOR_STRING,
y: MASS_NODE_Y_POSITION,
snapToNearest: GravityForceLabConstants.LOCATION_SNAP_VALUE,

}, options );

// @private
Expand Down

0 comments on commit 2f08d35

Please sign in to comment.