From e20c16c1e96d5d8e66dbf250bf797c10f22410ba Mon Sep 17 00:00:00 2001 From: John Date: Sat, 23 Aug 2014 20:35:42 -0700 Subject: [PATCH] Fixed default cellSize in Terrarium constructor Previously, if not defined cellSize defaulted to undefined. --- app/terrarium.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/terrarium.js b/app/terrarium.js index 690f6cc..a333e16 100644 --- a/app/terrarium.js +++ b/app/terrarium.js @@ -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;