mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Fix small error in Doc.js
This commit is contained in:
parent
31c51ea9eb
commit
d85217c40d
1 changed files with 3 additions and 3 deletions
|
@ -6,13 +6,13 @@ Doc = Base.extend({
|
||||||
this.size = new Size(canvas.offsetWidth, canvas.offsetHeight);
|
this.size = new Size(canvas.offsetWidth, canvas.offsetHeight);
|
||||||
}
|
}
|
||||||
this.activeLayer = new Layer();
|
this.activeLayer = new Layer();
|
||||||
this.children = this.activeLayer;
|
this.layers = [this.activeLayer];
|
||||||
},
|
},
|
||||||
redraw: function() {
|
redraw: function() {
|
||||||
if(this.canvas) {
|
if(this.canvas) {
|
||||||
this.ctx.clearRect(0, 0, this.size.width, this.size.height);
|
this.ctx.clearRect(0, 0, this.size.width, this.size.height);
|
||||||
for(var i = 0, l = this.children.length; i < l; i++) {
|
for(var i = 0, l = this.layers.length; i < l; i++) {
|
||||||
this.children[i].draw(this.ctx);
|
this.layers[i].draw(this.ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue