Skip to content

Commit

Permalink
convert _.extend to merge in zepumph responsible sims, phetsims/phet-…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Oct 11, 2019
1 parent 7e1cec5 commit 1f27fb6
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 10 deletions.
3 changes: 2 additions & 1 deletion js/friction/view/BookRubSoundGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ define( require => {
// modules
const BooleanProperty = require( 'AXON/BooleanProperty' );
const friction = require( 'FRICTION/friction' );
const merge = require( 'PHET_CORE/merge' );
const NoiseGenerator = require( 'TAMBO/sound-generators/NoiseGenerator' );
const NumberProperty = require( 'AXON/NumberProperty' );
const Property = require( 'AXON/Property' );
Expand All @@ -31,7 +32,7 @@ define( require => {
*/
constructor( topBookPositionProperty, contactProperty, options ) {

options = _.extend( {
options = merge( {
noiseType: 'pink',
centerFrequency: FRICTION_SOUND_CENTER_FREQUENCY,
qFactor: 2,
Expand Down
3 changes: 2 additions & 1 deletion js/friction/view/CoolingSoundGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ define( require => {

// modules
const friction = require( 'FRICTION/friction' );
const merge = require( 'PHET_CORE/merge' );
const NoiseGenerator = require( 'TAMBO/sound-generators/NoiseGenerator' );

// constants
Expand All @@ -26,7 +27,7 @@ define( require => {
*/
constructor( moleculeOscillationAmplitudeProperty, options ) {

options = _.extend( {
options = merge( {
noiseType: 'pink',
centerFrequency: 6000,
qFactor: 4,
Expand Down
3 changes: 2 additions & 1 deletion js/friction/view/CueArrow.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ define( require => {
const ArrowNode = require( 'SCENERY_PHET/ArrowNode' );
const FocusHighlightPath = require( 'SCENERY/accessibility/FocusHighlightPath' );
const friction = require( 'FRICTION/friction' );
const merge = require( 'PHET_CORE/merge' );

/**
*
Expand All @@ -21,7 +22,7 @@ define( require => {
constructor( options ) {

// these values were empirically determined based on visual appearance
options = _.extend( {
options = merge( {
headHeight: 32,
headWidth: 30,
tailWidth: 15,
Expand Down
3 changes: 2 additions & 1 deletion js/friction/view/FrictionDragHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ define( require => {
// modules
const friction = require( 'FRICTION/friction' );
const inherit = require( 'PHET_CORE/inherit' );
const merge = require( 'PHET_CORE/merge' );
const SimpleDragHandler = require( 'SCENERY/input/SimpleDragHandler' );
const Vector2 = require( 'DOT/Vector2' );

Expand All @@ -25,7 +26,7 @@ define( require => {
function FrictionDragHandler( model, temperatureIncreasingDescriber, temperatureDecreasingDescriber,
bookMovementDescriber, tandem, options ) {

options = _.extend( {
options = merge( {

// {SoundClip} - sounds to be played at start and end of drag
startSound: null,
Expand Down
3 changes: 2 additions & 1 deletion js/friction/view/FrictionGrabDragInteraction.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ define( require => {
const FrictionA11yStrings = require( 'FRICTION/friction/FrictionA11yStrings' );
const FrictionModel = require( 'FRICTION/friction/model/FrictionModel' );
const GrabDragInteraction = require( 'SCENERY_PHET/accessibility/GrabDragInteraction' );
const merge = require( 'PHET_CORE/merge' );
const utteranceQueue = require( 'SCENERY_PHET/accessibility/utteranceQueue' );

// a11y strings
Expand All @@ -33,7 +34,7 @@ define( require => {
class FrictionGrabDragInteraction extends GrabDragInteraction {

constructor( model, wrappedNode, options ) {
options = _.extend( {
options = merge( {

// Function that returns whether or not the drag cue should be shown.
successfulDrag: () => {
Expand Down
3 changes: 2 additions & 1 deletion js/friction/view/FrictionKeyboardHelpContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ define( require => {
const FrictionA11yStrings = require( 'FRICTION/friction/FrictionA11yStrings' );
const GeneralKeyboardHelpSection = require( 'SCENERY_PHET/keyboard/help/GeneralKeyboardHelpSection' );
const KeyboardHelpSection = require( 'SCENERY_PHET/keyboard/help/KeyboardHelpSection' );
const merge = require( 'PHET_CORE/merge' );
const TwoColumnKeyboardHelpContent = require( 'SCENERY_PHET/keyboard/help/TwoColumnKeyboardHelpContent' );

// strings
Expand Down Expand Up @@ -65,7 +66,7 @@ define( require => {
* @param {Object} [options]
*/
constructor( options ) {
options = _.extend( {
options = merge( {

// icon options
arrowKeysScale: 0.55
Expand Down
3 changes: 2 additions & 1 deletion js/friction/view/MoleculeMotionSoundGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ define( require => {
const friction = require( 'FRICTION/friction' );
const FrictionConstants = require( 'FRICTION/friction/FrictionConstants' );
const FrictionModel = require( 'FRICTION/friction/model/FrictionModel' );
const merge = require( 'PHET_CORE/merge' );
const SoundClip = require( 'TAMBO/sound-generators/SoundClip' );
const SoundGenerator = require( 'TAMBO/sound-generators/SoundGenerator' );

Expand All @@ -36,7 +37,7 @@ define( require => {
*/
constructor( moleculeAmplitudeProperty, options ) {

options = _.extend( {
options = merge( {
maxOutputLevel: 1 // max gain for this sound generator, sets the overall output of this sound generator
}, options );

Expand Down
3 changes: 2 additions & 1 deletion js/friction/view/book/BookNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ define( require => {
const FrictionGrabDragInteraction = require( 'FRICTION/friction/view/FrictionGrabDragInteraction' );
const FrictionKeyboardDragListener = require( 'FRICTION/friction/view/FrictionKeyboardDragListener' );
const inherit = require( 'PHET_CORE/inherit' );
const merge = require( 'PHET_CORE/merge' );
const Node = require( 'SCENERY/nodes/Node' );
const Shape = require( 'KITE/Shape' );
const SoundClip = require( 'TAMBO/sound-generators/SoundClip' );
Expand Down Expand Up @@ -53,7 +54,7 @@ define( require => {
bookMovementDescriber, tandem, options ) {
const self = this;

options = _.extend( {
options = merge( {

// whether or not we can drag the book
drag: false,
Expand Down
3 changes: 2 additions & 1 deletion js/friction/view/book/CoverNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ define( require => {
const friction = require( 'FRICTION/friction' );
const FrictionConstants = require( 'FRICTION/friction/FrictionConstants' );
const inherit = require( 'PHET_CORE/inherit' );
const merge = require( 'PHET_CORE/merge' );
const Node = require( 'SCENERY/nodes/Node' );
const Path = require( 'SCENERY/nodes/Path' );
const PhetFont = require( 'SCENERY_PHET/PhetFont' );
Expand All @@ -38,7 +39,7 @@ define( require => {
*/
function CoverNode( title, tandem, options ) {

options = _.extend( {
options = merge( {
stroke: 'gray',
color: 'black'
}, options );
Expand Down
3 changes: 2 additions & 1 deletion js/friction/view/magnifier/MagnifierTargetNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ define( require => {
// modules
const friction = require( 'FRICTION/friction' );
const inherit = require( 'PHET_CORE/inherit' );
const merge = require( 'PHET_CORE/merge' );
const Node = require( 'SCENERY/nodes/Node' );
const Path = require( 'SCENERY/nodes/Path' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );
Expand All @@ -32,7 +33,7 @@ define( require => {
*/
function MagnifierTargetNode( x, y, width, height, cornerRadius, leftAnchor, rightAnchor, options ) {

options = _.extend( {
options = merge( {
stroke: 'black'
}, options );

Expand Down

0 comments on commit 1f27fb6

Please sign in to comment.