Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / src / core / src / dom / Element.dd.js
1 /**
2  * @class Ext.core.Element
3  */
4 Ext.core.Element.addMethods({
5     /**
6      * Initializes a {@link Ext.dd.DD} drag drop object for this element.
7      * @param {String} group The group the DD object is member of
8      * @param {Object} config The DD config object
9      * @param {Object} overrides An object containing methods to override/implement on the DD object
10      * @return {Ext.dd.DD} The DD object
11      */
12     initDD : function(group, config, overrides){
13         var dd = new Ext.dd.DD(Ext.id(this.dom), group, config);
14         return Ext.apply(dd, overrides);
15     },
16
17     /**
18      * Initializes a {@link Ext.dd.DDProxy} object for this element.
19      * @param {String} group The group the DDProxy object is member of
20      * @param {Object} config The DDProxy config object
21      * @param {Object} overrides An object containing methods to override/implement on the DDProxy object
22      * @return {Ext.dd.DDProxy} The DDProxy object
23      */
24     initDDProxy : function(group, config, overrides){
25         var dd = new Ext.dd.DDProxy(Ext.id(this.dom), group, config);
26         return Ext.apply(dd, overrides);
27     },
28
29     /**
30      * Initializes a {@link Ext.dd.DDTarget} object for this element.
31      * @param {String} group The group the DDTarget object is member of
32      * @param {Object} config The DDTarget config object
33      * @param {Object} overrides An object containing methods to override/implement on the DDTarget object
34      * @return {Ext.dd.DDTarget} The DDTarget object
35      */
36     initDDTarget : function(group, config, overrides){
37         var dd = new Ext.dd.DDTarget(Ext.id(this.dom), group, config);
38         return Ext.apply(dd, overrides);
39     }
40 });