From a0911a808df126e8254ab0dc867c12e90ca9fcb7 Mon Sep 17 00:00:00 2001 From: pixelzoom Date: Thu, 23 Jun 2022 20:00:47 -0600 Subject: [PATCH] change constructor signature for ComboBox and its subclasses, https://github.com/phetsims/sun/issues/769 --- js/common/view/SoluteComboBox.js | 6 +++--- js/macro/view/MacroScreenView.js | 2 +- js/micro/view/MicroScreenView.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/common/view/SoluteComboBox.js b/js/common/view/SoluteComboBox.js index a1f8f68f..58144dbf 100644 --- a/js/common/view/SoluteComboBox.js +++ b/js/common/view/SoluteComboBox.js @@ -19,13 +19,13 @@ import phScale from '../../phScale.js'; class SoluteComboBox extends ComboBox { /** - * @param {Solute[]} solutes * @param {Property.} 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', @@ -81,7 +81,7 @@ class SoluteComboBox extends ComboBox { textNode.maxWidth = maxWidth; } ); - super( items, selectedSolute, soluteListParent, options ); + super( selectedSolute, items, soluteListParent, options ); } } diff --git a/js/macro/view/MacroScreenView.js b/js/macro/view/MacroScreenView.js index 0bc101e7..76f31a59 100644 --- a/js/macro/view/MacroScreenView.js +++ b/js/macro/view/MacroScreenView.js @@ -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' ) } ); diff --git a/js/micro/view/MicroScreenView.js b/js/micro/view/MicroScreenView.js index cdb7e909..13bcda44 100644 --- a/js/micro/view/MicroScreenView.js +++ b/js/micro/view/MicroScreenView.js @@ -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' ) } );