From 8bc06fb984fd1feaa2d9fa373fc52c8f56d57b57 Mon Sep 17 00:00:00 2001 From: zepumph Date: Mon, 14 Nov 2016 11:31:20 -0700 Subject: [PATCH] Added tandems to soluteCombobox phetsims/phet-io#190 --- js/concentration/model/Solute.js | 1 + js/concentration/view/SoluteComboBox.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/js/concentration/model/Solute.js b/js/concentration/model/Solute.js index 41864d18..c291ad4c 100644 --- a/js/concentration/model/Solute.js +++ b/js/concentration/model/Solute.js @@ -68,6 +68,7 @@ define( function( require ) { // no corresponding removeInstance is needed because this object exists for the lifetime of the sim tandem.addInstance( this, TSolute ); + this.tandemName = tandem.tail; } beersLawLab.register( 'Solute', Solute ); diff --git a/js/concentration/view/SoluteComboBox.js b/js/concentration/view/SoluteComboBox.js index 64742ecc..a47672ef 100644 --- a/js/concentration/view/SoluteComboBox.js +++ b/js/concentration/view/SoluteComboBox.js @@ -70,7 +70,7 @@ define( function( require ) { textNode.left = colorNode.right + 5; textNode.centerY = colorNode.centerY; - return ComboBox.createItem( node, solute ); + return ComboBox.createItem( node, solute, {tandemName: solute.tandemName} ); }; return inherit( ComboBox, SoluteComboBox );