mirror of
https://github.com/konvajs/konva.git
synced 2025-12-05 03:24:23 +08:00
setup simple serialization
This commit is contained in:
@@ -10,11 +10,14 @@
|
||||
* @param {Object} config
|
||||
*/
|
||||
Kinetic.Layer = function(config) {
|
||||
this.className = 'Layer';
|
||||
this.nodeType = 'Layer';
|
||||
this.canvas = document.createElement('canvas');
|
||||
this.context = this.canvas.getContext('2d');
|
||||
this.canvas.style.position = 'absolute';
|
||||
|
||||
// used for serialization
|
||||
Kinetic.GlobalObject.jsonProps.call(this, []);
|
||||
|
||||
// call super constructors
|
||||
Kinetic.Container.apply(this, []);
|
||||
Kinetic.Node.apply(this, [config]);
|
||||
|
||||
Reference in New Issue
Block a user