mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
fix 149 cleaned up Kinetic.Canvas usage
This commit is contained in:
parent
4cc505446a
commit
908fa24b8e
@ -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();
|
||||
},
|
||||
|
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user