Skip to content

Commit

Permalink
change constructor signature for ComboBox and its subclasses, phetsim…
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Jun 24, 2022
1 parent 6b04f93 commit a0911a8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions js/common/view/SoluteComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ import phScale from '../../phScale.js';
class SoluteComboBox extends ComboBox {

/**
* @param {Solute[]} solutes
* @param {Property.<Solute>} selectedSolute
* @param {Solute[]} solutes
* @param {Node} soluteListParent
* @param {Object} [options]
* @constructor
*/
constructor( solutes, selectedSolute, soluteListParent, options ) {
constructor( selectedSolute, solutes, soluteListParent, options ) {

options = merge( {
listPosition: 'below',
Expand Down Expand Up @@ -81,7 +81,7 @@ class SoluteComboBox extends ComboBox {
textNode.maxWidth = maxWidth;
} );

super( items, selectedSolute, soluteListParent, options );
super( selectedSolute, items, soluteListParent, options );
}
}

Expand Down
2 changes: 1 addition & 1 deletion js/macro/view/MacroScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class MacroScreenView extends ScreenView {

// solutes combo box
const soluteListParent = new Node();
const soluteComboBox = new SoluteComboBox( model.solutes, model.dropper.soluteProperty, soluteListParent, {
const soluteComboBox = new SoluteComboBox( model.dropper.soluteProperty, model.solutes, soluteListParent, {
maxWidth: 400,
tandem: tandem.createTandem( 'soluteComboBox' )
} );
Expand Down
2 changes: 1 addition & 1 deletion js/micro/view/MicroScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class MicroScreenView extends ScreenView {

// solutes combo box
const soluteListParent = new Node();
const soluteComboBox = new SoluteComboBox( model.solutes, model.dropper.soluteProperty, soluteListParent, {
const soluteComboBox = new SoluteComboBox( model.dropper.soluteProperty, model.solutes, soluteListParent, {
maxWidth: 400,
tandem: tandem.createTandem( 'soluteComboBox' )
} );
Expand Down

0 comments on commit a0911a8

Please sign in to comment.