Skip to content

Commit

Permalink
Renamed var and revised docs, see #64
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Feb 13, 2018
1 parent 9d6172f commit 288218c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion js/friction/view/book/BookNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ define( function( require ) {
var bookTitleStringPattern = FrictionA11yStrings.bookTitleStringPattern.value;

/**
* @param {FrictionModel} model TODO: after making TODO changes below, maybe the entire model doesn't need to be passed in
* @param {FrictionModel} model
* @param {string} title - title that appears on the book spine
* @param {Object} [options]
* @constructor
Expand Down
11 changes: 5 additions & 6 deletions js/friction/view/magnifier/AtomCanvasNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ define( function( require ) {
);
context.fill();

// array that holds the AtomNode views
// TODO: visibility annotation
this.atoms = [];
// @private - array that holds the AtomNode views
this.atomCanvasNodeAtoms = [];

// pre-allocated vector, improves performance
// TODO: visibility annotation
Expand All @@ -110,8 +109,8 @@ define( function( require ) {
var particleImageSize = FrictionConstants.ATOM_RADIUS * 2 * 1.1;

// render each of the atoms on the canvas
for ( var i = 0; i < this.atoms.length; i++ ) {
var atom = this.atoms[ i ];
for ( var i = 0; i < this.atomCanvasNodeAtoms.length; i++ ) {
var atom = this.atomCanvasNodeAtoms[ i ];
this.particleImagePosition.x = atom.currentX - particleImageSize / 2;
this.particleImagePosition.y = atom.currentY - particleImageSize / 2;
context.drawImage(
Expand All @@ -134,7 +133,7 @@ define( function( require ) {
* @public
*/
registerAtom: function( atom ) {
this.atoms.push( atom );
this.atomCanvasNodeAtoms.push( atom );
}
} );
} );

0 comments on commit 288218c

Please sign in to comment.