Use canvas instead of sketchCanvas

This commit is contained in:
A 2016-09-23 16:19:08 -04:00 committed by GitHub
parent c24e8ceedf
commit e38c53ff31

View File

@ -430,15 +430,15 @@ $.Drawer.prototype = {
bounds.width += bounds.x; bounds.width += bounds.x;
bounds.x = 0; bounds.x = 0;
} }
if (bounds.width > this.sketchCanvas.width) { if (bounds.width > this.canvas.width) {
bounds.width = this.sketchCanvas.width; bounds.width = this.canvas.width;
} }
if (bounds.y < 0) { if (bounds.y < 0) {
bounds.height += bounds.y; bounds.height += bounds.y;
bounds.y = 0; bounds.y = 0;
} }
if (bounds.height > this.sketchCanvas.height) { if (bounds.height > this.canvas.height) {
bounds.height = this.sketchCanvas.height; bounds.height = this.canvas.height;
} }
this.context.drawImage( this.context.drawImage(