first phase of new attrs architecture to better represent Node states

This commit is contained in:
Eric Rowell
2012-04-05 23:48:58 -07:00
parent 15bd27562e
commit 6d618b97b5
15 changed files with 833 additions and 764 deletions

View File

@@ -15,9 +15,6 @@ Kinetic.Layer = function(config) {
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]);
@@ -76,7 +73,7 @@ Kinetic.Layer.prototype = {
*/
_draw: function() {
this.clear();
if(this.visible) {
if(this.attrs.visible) {
this._drawChildren();
}
}