Skip to content

Commit

Permalink
doc, call invalidatePaint when the ball size changes, #62
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Sep 2, 2016
1 parent d6f779f commit 3e6504e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/common/view/BallsNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ define( function( require ) {
self.invalidatePaint(); // calls paintCanvas
} );

// Adjust size of the balls based on the number of rows in the Galton board
numberOfRowsProperty.link( function( numberOfRows ) {
self.scaleFactor = defaultNumberOfRows / numberOfRows;
self.invalidatePaint(); // calls paintCanvas
} );

// calls paintCanvas
Expand Down

0 comments on commit 3e6504e

Please sign in to comment.