mirror of
https://github.com/konvajs/konva.git
synced 2025-07-15 14:41:50 +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.content.className = 'kineticjs-content';
|
||||||
this.attrs.container.appendChild(this.content);
|
this.attrs.container.appendChild(this.content);
|
||||||
|
|
||||||
this.bufferCanvas = new Kinetic.Canvas({
|
this.bufferCanvas = new Kinetic.Canvas();
|
||||||
width: this.attrs.width,
|
|
||||||
height: this.attrs.height
|
|
||||||
});
|
|
||||||
|
|
||||||
this._resizeDOM();
|
this._resizeDOM();
|
||||||
},
|
},
|
||||||
|
@ -9,8 +9,8 @@ Kinetic.Canvas = function(width, height) {
|
|||||||
this.context = this.element.getContext('2d');
|
this.context = this.element.getContext('2d');
|
||||||
|
|
||||||
// set dimensions
|
// set dimensions
|
||||||
this.element.width = width;
|
this.element.width = width || 0;
|
||||||
this.element.height = height;
|
this.element.height = height || 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
Kinetic.Canvas.prototype = {
|
Kinetic.Canvas.prototype = {
|
||||||
|
Loading…
Reference in New Issue
Block a user