Skip to content

Commit

Permalink
Reviewed function declarations, see #64
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Feb 7, 2018
1 parent 7235c9e commit 1abaedf
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
3 changes: 1 addition & 2 deletions js/friction/view/magnifier/AtomCanvasNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,5 @@ define( function( require ) {
registerAtom: function( atom ) {
this.atoms.push( atom );
}

} );
} );
} );
13 changes: 13 additions & 0 deletions js/friction/view/magnifier/AtomNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ define( function( require ) {
friction.register( 'AtomNode', AtomNode );

return inherit( Node, AtomNode, {

/**
* TODO: visibility annotation
*/
evaporate: function() {
var self = this;

Expand All @@ -117,9 +121,18 @@ define( function( require ) {
// TODO: does this file need a dispose function?
this.model.newStepProperty.link( self.handler );
},

/**
* TODO: visibility annotation
* @returns {number}
*/
getYrange: function() {
return this.model.distanceProperty.get() + this.model.atoms.distanceY * this.model.toEvaporate.length;
},

/**
* @public
*/
reset: function() {
this.x0 = this.options.x;
this.y0 = this.options.y;
Expand Down
3 changes: 3 additions & 0 deletions js/friction/view/magnifier/MagnifierNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ define( function( require ) {
this.atomCanvasNode.invalidatePaint(); // tell the atom canvas to redraw itself
},

/**
* @param {FrictionModel} model
*/
addAtoms: function( model ) {
var self = this;
var topAtoms = this.param.topAtoms;
Expand Down
6 changes: 6 additions & 0 deletions js/friction/view/magnifier/MagnifierTargetNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ define( function( require ) {
return inherit( Node, MagnifierTargetNode, {

// TODO: rename method
/**
* TODO: document
* @param {number} x
* @param {number} y
* TODO: mark visibility
*/
set: function( x, y ) {
this.pathLeft.setShape( new Shape()
.moveTo( this.leftAnchor.x, this.leftAnchor.y )
Expand Down

0 comments on commit 1abaedf

Please sign in to comment.