Skip to content

Commit

Permalink
Eliminated unnecessary constructor parameters, see #86
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Nov 21, 2017
1 parent 04bd519 commit 34059dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion js/faradays-law/model/FaradaysLawModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ define( function( require ) {
} );

// @public - the magnet which can be dragged
this.magnet = new Magnet( 647, 219, 140, 30, tandem.createTandem( 'magnet' ) );
this.magnet = new Magnet( tandem.createTandem( 'magnet' ) );

// @public - bottom coil
this.bottomCoil = new Coil( new Vector2( 448, 328 ), 4, this.magnet );
Expand Down
12 changes: 4 additions & 8 deletions js/faradays-law/model/Magnet.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,19 @@ define( function( require ) {
var Vector2IO = require( 'DOT/Vector2IO' );

/**
* @param {number} x - x position of magnet
* @param {number} y - y position of magnet
* @param {number} width - width of magnet
* @param {number} height - height of magnet
* @param {Tandem} tandem
* @constructor
*/
function Magnet( x, y, width, height, tandem ) {
function Magnet( tandem ) {

// @public {number} - width of the magnet
this.width = width;
this.width = 140;

// @public {number} - height of the magnet
this.height = height;
this.height = 30;

// @public {Property.<Vector2>} - position of the magnet
this.positionProperty = new Property( new Vector2( x, y ), {
this.positionProperty = new Property( new Vector2( 647, 219 ), {
tandem: tandem.createTandem( 'positionProperty' ),
phetioType: PropertyIO( Vector2IO )
} );
Expand Down

0 comments on commit 34059dc

Please sign in to comment.