Skip to content

Commit

Permalink
Improved arch support for combobox, see phetsims/sun#162 and phetsims…
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Mar 6, 2015
1 parent 80323f6 commit fd0ca19
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion js/concentration/model/Solute.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,23 @@ define( function( require ) {
* Constructor.
* @param {string} name
* @param {string} formula
* @param {string} apiName - A non-internationalized unique identifier that can be used to access the solute
* @param {number} stockSolutionConcentration
* @param {SoluteColorScheme} colorScheme
* @param {Color|undefined} particleColor
* @param {Number|undefined} particleSize
* @param {Number|undefined} particlesPerMole
* @constructor
*/
function Solute( name, formula, stockSolutionConcentration, colorScheme, particleColor, particleSize, particlesPerMole ) {
function Solute( name, formula, apiName, stockSolutionConcentration, colorScheme, particleColor, particleSize, particlesPerMole ) {
this.name = name;
this.formula = formula;
this.stockSolutionConcentration = stockSolutionConcentration;
this.colorScheme = colorScheme;
this.particleColor = particleColor || colorScheme.maxColor;
this.particleSize = particleSize || 5;
this.particlesPerMole = particlesPerMole || 200;
this.apiName = apiName;
}

inherit( Object, Solute, {
Expand All @@ -58,6 +60,7 @@ define( function( require ) {
Solute.DRINK_MIX = new Solute(
drinkMixString,
drinkMixString,
'drinkMix',
5.5,
new SoluteColorScheme( 0, new Color( 224, 255, 255 ),
0.05, new Color( 255, 225, 225 ),
Expand All @@ -66,6 +69,7 @@ define( function( require ) {
Solute.COBALT_II_NITRATE = new Solute(
cobaltIINitrateString,
BLLSymbols.COBALT_II_NITRATE,
'cobaltIINitrate',
5.0,
new SoluteColorScheme( 0, Solvent.WATER_COLOR,
0.05, new Color( 255, 225, 225 ),
Expand All @@ -74,6 +78,7 @@ define( function( require ) {
Solute.COBALT_CHLORIDE = new Solute(
cobaltChlorideString,
BLLSymbols.COBALT_CHLORIDE,
'cobaltChloride',
4.0,
new SoluteColorScheme( 0, Solvent.WATER_COLOR,
0.05, new Color( 255, 242, 242 ),
Expand All @@ -82,6 +87,7 @@ define( function( require ) {
Solute.POTASSIUM_DICHROMATE = new Solute(
potassiumDichromateString,
BLLSymbols.POTASSIUM_DICHROMATE,
'potassiumDichromate',
0.5,
new SoluteColorScheme( 0, Solvent.WATER_COLOR,
0.01, new Color( 255, 204, 153 ),
Expand All @@ -90,6 +96,7 @@ define( function( require ) {
Solute.POTASSIUM_CHROMATE = new Solute(
potassiumChromateString,
BLLSymbols.POTASSIUM_CHROMATE,
'potassiumChromate',
3.0,
new SoluteColorScheme( 0, Solvent.WATER_COLOR,
0.05, new Color( 255, 255, 153 ),
Expand All @@ -98,6 +105,7 @@ define( function( require ) {
Solute.NICKEL_II_CHLORIDE = new Solute(
nickelIIChlorideString,
BLLSymbols.NICKEL_II_CHLORIDE,
'nickelIIChloride',
5.0,
new SoluteColorScheme( 0, Solvent.WATER_COLOR,
0.2, new Color( 170, 255, 170 ),
Expand All @@ -106,6 +114,7 @@ define( function( require ) {
Solute.COPPER_SULFATE = new Solute(
copperSulfateString,
BLLSymbols.COPPER_SULFATE,
'copperSulfate',
1.0,
new SoluteColorScheme( 0, Solvent.WATER_COLOR,
0.2, new Color( 200, 225, 255 ),
Expand All @@ -114,6 +123,7 @@ define( function( require ) {
Solute.POTASSIUM_PERMANGANATE = new Solute(
potassiumPermanganateString,
BLLSymbols.POTASSIUM_PERMANGANATE,
'potassiumPermanganate',
0.4,
new SoluteColorScheme( 0, Solvent.WATER_COLOR,
0.01, new Color( 255, 0, 255 ),
Expand Down

0 comments on commit fd0ca19

Please sign in to comment.