mirror of
https://github.com/rileyjshaw/terra.git
synced 2024-11-21 04:54:23 +00:00
Merge pull request #7 from johnhenry/patch-1
Fix default cellSize in Terrarium constructor
This commit is contained in:
commit
4956fbccaa
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user