Skip to content

Commit

Permalink
Removed unused var, see #64
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Feb 13, 2018
1 parent 288218c commit 74a2982
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions js/friction/view/magnifier/AtomCanvasNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ define( function( require ) {
var friction = require( 'FRICTION/friction' );
var FrictionConstants = require( 'FRICTION/friction/FrictionConstants' );
var inherit = require( 'PHET_CORE/inherit' );
var Vector2 = require( 'DOT/Vector2' );

// constants
var PARTICLE_IMAGE_SIZE = 32; // pixels, square
Expand Down Expand Up @@ -88,10 +87,6 @@ define( function( require ) {

// @private - array that holds the AtomNode views
this.atomCanvasNodeAtoms = [];

// pre-allocated vector, improves performance
// TODO: visibility annotation
this.particleImagePosition = new Vector2();
}

friction.register( 'AtomCanvasNode', AtomCanvasNode );
Expand All @@ -111,16 +106,14 @@ define( function( require ) {
// render each of the atoms on the canvas
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(
this.particleImageCanvas,
atom.isTopAtom ? 0 : PARTICLE_IMAGE_SIZE,
0,
PARTICLE_IMAGE_SIZE,
PARTICLE_IMAGE_SIZE,
this.particleImagePosition.x,
this.particleImagePosition.y,
atom.currentX - particleImageSize / 2,
atom.currentY - particleImageSize / 2,
particleImageSize,
particleImageSize
);
Expand Down

0 comments on commit 74a2982

Please sign in to comment.