Skip to content

Commit

Permalink
Added shaker location property to the API, see #34
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Mar 7, 2015
1 parent 0d1548e commit 6987c90
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/concentration-api-routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ define( function( require ) {

// TODO: This should probably use a surrogate instead of getting the entire Solute value from the sim
// TODO: I am surprised that save/load works--if reference equality was used, this would fail.
'concentrationScreen.solute': 'concentrationScreen.model.solute'
'concentrationScreen.solute': 'concentrationScreen.model.solute',

'concentrationScreen.shaker.location': 'concentrationScreen.model.shaker.locationProperty'
};
} );
6 changes: 6 additions & 0 deletions js/concentration-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ define( function( require ) {
}
};

var Vector2 = {
name: 'Vector2'
};
// Use explicit names for id keys so they will match what researchers see in data files
// Use id and type instead of componentID and typeID to simplify things for researchers
// Use a map so that JS will help us check that there are no duplicate names.
Expand All @@ -104,6 +107,9 @@ define( function( require ) {
'concentrationScreen.solute': {
type: Property( 'string' )
},
'concentrationScreen.shaker.location': {
type: Property( Vector2 )
},
'concentrationScreen.resetAllButton': {
type: ResetAllButton
},
Expand Down

0 comments on commit 6987c90

Please sign in to comment.