4 * Copyright(c) 2006-2007, Ext JS, LLC.
6 * Originally Released Under LGPL - original licence link has changed is not relivant.
9 * <script type="text/javascript">
13 // This is a support class used internally by the Grid components
14 Roo.grid.HeaderDragZone = function(grid, hd, hd2){
16 this.view = grid.getView();
17 this.ddGroup = "gridHeader" + this.grid.getGridEl().id;
18 Roo.grid.HeaderDragZone.superclass.constructor.call(this, hd);
20 this.setHandleElId(Roo.id(hd));
21 this.setOuterHandleElId(Roo.id(hd2));
25 Roo.extend(Roo.grid.HeaderDragZone, Roo.dd.DragZone, {
27 getDragData : function(e){
28 var t = Roo.lib.Event.getTarget(e);
29 var h = this.view.findHeaderCell(t);
31 return {ddel: h.firstChild, header:h};
36 onInitDrag : function(e){
37 this.view.headersDisabled = true;
38 var clone = this.dragData.ddel.cloneNode(true);
40 clone.style.width = Math.min(this.dragData.header.offsetWidth,this.maxDragWidth) + "px";
41 this.proxy.update(clone);
45 afterValidDrop : function(){
47 setTimeout(function(){
48 v.headersDisabled = false;
52 afterInvalidDrop : function(){
54 setTimeout(function(){
55 v.headersDisabled = false;