Fixes bug in shape/line
authordsc <david.schoonover@gmail.com>
Tue, 7 Dec 2010 21:54:54 +0000 (13:54 -0800)
committerdsc <david.schoonover@gmail.com>
Tue, 7 Dec 2010 21:54:54 +0000 (13:54 -0800)
src/ezl/layer.cjs
src/ezl/shape/line.cjs

index 0f5c5f2..53f0f54 100644 (file)
@@ -88,7 +88,7 @@ Y.subclass('Layer', {
         this.dirty = true;
         
         // Layer? Add self as new child, fix DOM
-        if ( parent instanceof Layer ){
+        if ( parent instanceof Layer ) {
             this.parent = parent;
             parent.children.push(this);
             parent.layer.append(this.layer);
@@ -143,17 +143,6 @@ Y.subclass('Layer', {
             for (var k in key)
                 this.attr(k, key[k]);
             return this;
-            
-        // } else if ( CONTEXT_ATTRS.has(key) ) {
-        //     var r = Y.attr(this.ctx, key, value, def);
-        //     
-        //     if (r === this.ctx) {
-        //         // This implies we set a property
-        //         this.dirty = true;
-        //         return this;
-        //     } else
-        //         return r;
-        //     
         } else
             return Y.op.attr(this, key, value, def);
     },
@@ -485,6 +474,10 @@ Y.subclass('Layer', {
         return this;
     },
     
+    animate : function animate(props, options) {
+        
+    },
+    
     
     
     /// Misc ///
@@ -496,7 +489,7 @@ Y.subclass('Layer', {
 
 function makeDelegate(name, dirties, prop){
     prop = prop || 'layer';
-    return function(){
+    return function delegate(){
         if (dirties && arguments.length)
             this.dirty = true;
         
index b26598b..9de4298 100644 (file)
@@ -1,7 +1,9 @@
 //#ensure "jquery"
 
 var Y = require('Y').Y
+,   Layer = require('ezl/layer').Layer
 ,   Shape = require('ezl/shape/shape').Shape
+,   math = require('ezl/math')
 ,
 
 Line =