Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / src / core / src / dom / Element.dd.js
1 /*
2
3 This file is part of Ext JS 4
4
5 Copyright (c) 2011 Sencha Inc
6
7 Contact:  http://www.sencha.com/contact
8
9 GNU General Public License Usage
10 This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file.  Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
11
12 If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
13
14 */
15 /**
16  * @class Ext.Element
17  */
18 Ext.Element.addMethods({
19     /**
20      * Initializes a {@link Ext.dd.DD} drag drop object for this element.
21      * @param {String} group The group the DD object is member of
22      * @param {Object} config The DD config object
23      * @param {Object} overrides An object containing methods to override/implement on the DD object
24      * @return {Ext.dd.DD} The DD object
25      */
26     initDD : function(group, config, overrides){
27         var dd = new Ext.dd.DD(Ext.id(this.dom), group, config);
28         return Ext.apply(dd, overrides);
29     },
30
31     /**
32      * Initializes a {@link Ext.dd.DDProxy} object for this element.
33      * @param {String} group The group the DDProxy object is member of
34      * @param {Object} config The DDProxy config object
35      * @param {Object} overrides An object containing methods to override/implement on the DDProxy object
36      * @return {Ext.dd.DDProxy} The DDProxy object
37      */
38     initDDProxy : function(group, config, overrides){
39         var dd = new Ext.dd.DDProxy(Ext.id(this.dom), group, config);
40         return Ext.apply(dd, overrides);
41     },
42
43     /**
44      * Initializes a {@link Ext.dd.DDTarget} object for this element.
45      * @param {String} group The group the DDTarget object is member of
46      * @param {Object} config The DDTarget config object
47      * @param {Object} overrides An object containing methods to override/implement on the DDTarget object
48      * @return {Ext.dd.DDTarget} The DDTarget object
49      */
50     initDDTarget : function(group, config, overrides){
51         var dd = new Ext.dd.DDTarget(Ext.id(this.dom), group, config);
52         return Ext.apply(dd, overrides);
53     }
54 });