Roo/dd/DropTarget.js
authorAlan Knowles <alan@akbkhome.com>
Fri, 14 Jan 2011 08:18:50 +0000 (16:18 +0800)
committerAlan Knowles <alan@akbkhome.com>
Fri, 14 Jan 2011 08:18:50 +0000 (16:18 +0800)
Roo/dd/DropTarget.js

index 787fd72..6ab6fc4 100644 (file)
@@ -28,8 +28,59 @@ Roo.dd.DropTarget = function(el, config){
         Roo.dd.ScrollManager.register(this.el);
     }
     
-    Roo.dd.DropTarget.superclass.constructor.call(this, this.el.dom, this.ddGroup || this.group, 
-          {isTarget: true});
+    
+    this.events = {  
+        /**
+         * @scope Roo.BasicLayoutRegion
+         */
+        
+        /
+        /**
+         * @event invalidated
+         * Fires when the layout for this region is changed.
+         * @param {Roo.LayoutRegion} this
+         */
+        "invalidated" : true,
+        /**
+         * @event visibilitychange
+         * Fires when this region is shown or hidden 
+         * @param {Roo.LayoutRegion} this
+         * @param {Boolean} visibility true or false
+         */
+        "visibilitychange" : true,
+    }
+    Roo.dd.DropTarget.superclass.constructor.call(  this, 
+        this.el.dom, 
+        this.ddGroup || this.group, 
+        {
+            isTarget: true,
+            events : {
+                 /**
+                 * @scope Roo.dd.DropTarget
+                 */
+                 
+                 /**
+                 * @event notifyenter
+                 * The function a {@link Roo.dd.DragSource} calls once to notify this drop target that the source is now over the
+                 * target.  This default implementation adds the CSS class specified by overClass (if any) to the drop element
+                 * and returns the dropAllowed config value.  This method should be overridden if drop validation is required.
+                 * 
+                 * IMPORTANT : it should set this.overClass and this.dropAllowed;
+                 * 
+                 * @param {Roo.dd.DragSource} source The drag source that was dragged over this drop target
+                 * @param {Event} e The event
+                 * @param {Object} data An object containing arbitrary data supplied by the drag source
+                 * @return {String} status The CSS class that communicates the drop status back to the source so that the
+                 * underlying {@link Roo.dd.StatusProxy} can be updated
+                 */
+                "notifyenter" : true,
+                
+                
+            }
+                
+        
+        }
+    );
 
 };