Hover from left and hit the first column on grid's header
Hi,
I found another issue regarding header hovering. If it's the first header element and moving to the edge from left, probably outside of the grid, it checks if it's re-sizable but as it check for 'this.activeHdIndex -1' on 0 it will fail. My solution is as follow:
Code:
handleHdMove : function(e, t){
if(this.activeHd && !this.headersDisabled){
var hw = this.splitHandleWidth || 5;
var r = this.activeHdRegion;
var x = e.getPageX();
var ss = this.activeHd.style;
if(( this.activeHdIndex > 0 ) && x - r.left <= hw && this.cm.isResizable(this.activeHdIndex-1)){
ss.cursor = Ext.isAir ? 'move' : Ext.isSafari ? 'e-resize' : 'col-resize';
}else if(r.right - x <= (!this.activeHdBtn ? hw : 2) && this.cm.isResizable(this.activeHdIndex)){
ss.cursor = Ext.isAir ? 'move' : Ext.isSafari ? 'w-resize' : 'col-resize';
}else{
ss.cursor = '';
}
}
where this
Code:
if( x - r.left <= hw && this.cm.isResizable(this.activeHdIndex-1))
has been replaced with
Code:
if(( this.activeHdIndex > 0 ) && x - r.left <= hw && this.cm.isResizable(this.activeHdIndex-1))
both in 2.0.2 and 2.2.x
r. Sandor
Faced problem with handleHdOver in IE
Hi,
Currently facing problem in IE for column header menu drop down button.
In IE, when I row over any column header, the menu button appears at the last column.
Code:
handleHdOver : function(e, t){
var hd = this.findHeaderCell(t);
if(hd && !this.headersDisabled){
this.activeHdRef = t;
this.activeHdIndex = this.getCellIndex(hd);
var fly = this.fly(hd);
this.activeHdRegion = fly.getRegion();
if(!this.cm.isMenuDisabled(this.activeHdIndex)){
fly.addClass('x-grid3-hd-over');
this.activeHdBtn = fly.child('.x-grid3-hd-btn');
if(this.activeHdBtn){
this.activeHdBtn.dom.style.height = (hd.firstChild.offsetHeight-1)+'px';
}
}
}
}
It works fine in Mozilla FF.
Verified that (this.activeHdBtn.id) is getting generated correctly.
Also could not figure it out how Ext manages to display the menu button using the line:
Code:
this.activeHdBtn.dom.style.height = (hd.firstChild.offsetHeight-1)+'px';
Did anyone came across such behavior?
Thanks.
error in this.activeHdBtn.dom.style.height
hi , I am getting this error in this.activeHdBtn.dom.style.height, when i moved mouse on grid panel header.I don't want to disable header, don't want to re sizable =false and don't want to stop drag and drop column on my grid. may be problem with (hd.firstChild.offsetHeight) . its value is 0 so -1px is being assign to activeHdBtnHeight.
this.activeHdBtn.dom.style.height=(hd.firstChild.offsetHeight-1)+'px';
Quote:
Originally Posted by
splintor
OK, thanks for that.
For the time being, I guess I'll have to resort to add this line to my code:
Code:
MyColModel.isMenuDisabled = function() { return true; }
splintor