Merge pull request #7 from johnhenry/patch-1

Fix default cellSize in Terrarium constructor
This commit is contained in:
Riley Shaw 2014-08-23 20:46:18 -07:00
commit 4956fbccaa

View File

@ -12,9 +12,10 @@ var dom = require('./dom.js');
* @param {string} insertAfter id of the element to insert the canvas after
*/
function Terrarium(width, height, id, cellSize, insertAfter) {
cellSize = cellSize || 10;
this.width = width;
this.height = height;
this.cellSize = cellSize || 10;
this.cellSize = cellSize;
this.grid = [];
this.canvas = dom.createCanvasElement(width * cellSize, height * cellSize, id, insertAfter);
this.nextFrame = false;