From 6a637a5a043809a5c35e77044fd1dac6eefb76ba Mon Sep 17 00:00:00 2001 From: zepumph Date: Thu, 10 Oct 2019 21:16:06 -0800 Subject: [PATCH] convert _.extend to merge in zepumph responsible sims, https://github.com/phetsims/phet-core/issues/71 --- js/molarity/model/Solute.js | 3 ++- js/molarity/view/PrecipitateSoundGenerator.js | 5 +++-- js/molarity/view/SoluteComboBox.js | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/js/molarity/model/Solute.js b/js/molarity/model/Solute.js index 962b0dd8..968f3b7e 100644 --- a/js/molarity/model/Solute.js +++ b/js/molarity/model/Solute.js @@ -12,6 +12,7 @@ define( require => { // modules const inherit = require( 'PHET_CORE/inherit' ); + const merge = require( 'PHET_CORE/merge' ); const molarity = require( 'MOLARITY/molarity' ); const PhetioObject = require( 'TANDEM/PhetioObject' ); const SoluteIO = require( 'MOLARITY/molarity/model/SoluteIO' ); @@ -27,7 +28,7 @@ define( require => { */ function Solute( name, formula, saturatedConcentration, minColor, maxColor, options ) { - options = _.extend( { + options = merge( { particleColor: maxColor, // the solute's color as a particle phetioType: SoluteIO }, options ); diff --git a/js/molarity/view/PrecipitateSoundGenerator.js b/js/molarity/view/PrecipitateSoundGenerator.js index ddf4f14b..bf692572 100644 --- a/js/molarity/view/PrecipitateSoundGenerator.js +++ b/js/molarity/view/PrecipitateSoundGenerator.js @@ -10,9 +10,10 @@ define( require => { // modules const BinMapper = require( 'TAMBO/BinMapper' ); + const merge = require( 'PHET_CORE/merge' ); const molarity = require( 'MOLARITY/molarity' ); - const SoundClip = require( 'TAMBO/sound-generators/SoundClip' ); const Range = require( 'DOT/Range' ); + const SoundClip = require( 'TAMBO/sound-generators/SoundClip' ); // sounds const precipitateSound = require( 'sound!MOLARITY/precipitate.mp3' ); @@ -42,7 +43,7 @@ define( require => { */ constructor( precipitateAmountProperty, soluteAmountSlider, solutionVolumeSlider, options ) { - super( precipitateSound, _.extend( { + super( precipitateSound, merge( { initialOutputLevel: 0.5, rateChangesAffectPlayingSounds: false }, options ) ); diff --git a/js/molarity/view/SoluteComboBox.js b/js/molarity/view/SoluteComboBox.js index 33b6e7e5..3eedc1d6 100644 --- a/js/molarity/view/SoluteComboBox.js +++ b/js/molarity/view/SoluteComboBox.js @@ -12,6 +12,7 @@ define( require => { const ComboBox = require( 'SUN/ComboBox' ); const ComboBoxItem = require( 'SUN/ComboBoxItem' ); const HBox = require( 'SCENERY/nodes/HBox' ); + const merge = require( 'PHET_CORE/merge' ); const molarity = require( 'MOLARITY/molarity' ); const MolarityA11yStrings = require( 'MOLARITY/molarity/MolarityA11yStrings' ); const PhetFont = require( 'SCENERY_PHET/PhetFont' ); @@ -42,7 +43,7 @@ define( require => { */ constructor( solutes, selectedSoluteProperty, listParent, tandem, options ) { - options = _.extend( { + options = merge( { labelNode: new Text( StringUtils.format( pattern0LabelString, soluteString ), { font: new PhetFont( 22 ) } ), // 'Solute' label listPosition: 'above', cornerRadius: 8,