diff --git a/src/Doc.js b/src/Doc.js index e8080868..51695513 100644 --- a/src/Doc.js +++ b/src/Doc.js @@ -6,13 +6,13 @@ Doc = Base.extend({ this.size = new Size(canvas.offsetWidth, canvas.offsetHeight); } this.activeLayer = new Layer(); - this.children = this.activeLayer; + this.layers = [this.activeLayer]; }, redraw: function() { if(this.canvas) { this.ctx.clearRect(0, 0, this.size.width, this.size.height); - for(var i = 0, l = this.children.length; i < l; i++) { - this.children[i].draw(this.ctx); + for(var i = 0, l = this.layers.length; i < l; i++) { + this.layers[i].draw(this.ctx); } } }