setup simple serialization

This commit is contained in:
Eric Rowell
2012-04-04 22:57:36 -07:00
parent f5b6b3c06f
commit bf86dacb59
10 changed files with 213 additions and 52 deletions

View File

@@ -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]);