diff --git a/src/Stage.js b/src/Stage.js index 6a06bdbb..417db814 100644 --- a/src/Stage.js +++ b/src/Stage.js @@ -561,10 +561,7 @@ Kinetic.Stage.prototype = { this.content.className = 'kineticjs-content'; this.attrs.container.appendChild(this.content); - this.bufferCanvas = new Kinetic.Canvas({ - width: this.attrs.width, - height: this.attrs.height - }); + this.bufferCanvas = new Kinetic.Canvas(); this._resizeDOM(); }, diff --git a/src/util/Canvas.js b/src/util/Canvas.js index 5597e9b3..c1012db8 100644 --- a/src/util/Canvas.js +++ b/src/util/Canvas.js @@ -9,8 +9,8 @@ Kinetic.Canvas = function(width, height) { this.context = this.element.getContext('2d'); // set dimensions - this.element.width = width; - this.element.height = height; + this.element.width = width || 0; + this.element.height = height || 0; }; Kinetic.Canvas.prototype = {