Fix hover, fix colspan
parent
89084fa045
commit
9d8f352037
16
treegrid.js
16
treegrid.js
|
@ -6,7 +6,7 @@
|
|||
* - dynamic loading of child nodes
|
||||
*
|
||||
* License: MPL 2.0+, (c) Vitaliy Filippov 2016+
|
||||
* Version: 2017-07-07
|
||||
* Version: 2017-07-10
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -404,6 +404,7 @@ TreeGrid.prototype._syncStart = function(nodes)
|
|||
|
||||
TreeGrid.prototype._setPlaceholder = function(name, height)
|
||||
{
|
||||
this.placeholders[name][0].firstChild.setAttribute('colspan', this.header.length-(this.fixedColBody ? 1 : 0));
|
||||
this.placeholders[name][0].style.height = height+'px';
|
||||
this.placeholders[name][0].style.display = height > 0 ? '' : 'none';
|
||||
if (this.fixedColBody)
|
||||
|
@ -593,9 +594,22 @@ TreeGrid.prototype.nodeOnHover = function(hover, ev)
|
|||
subrow++;
|
||||
}
|
||||
if (hover)
|
||||
{
|
||||
if (this.hoveredNode)
|
||||
{
|
||||
this.hoveredNode.tr[this.hoveredRow].className = this.hoveredNode.tr[this.hoveredRow].className.replace(/ hover/g, '');
|
||||
if (this.stickyColumn)
|
||||
this.hoveredNode.col_tr[this.hoveredRow].className = this.hoveredNode.col_tr[this.hoveredRow].className.replace(/ hover/g, '');
|
||||
}
|
||||
e._node.tr[subrow].className += ' hover';
|
||||
this.hoveredNode = e._node;
|
||||
this.hoveredRow = subrow;
|
||||
}
|
||||
else
|
||||
{
|
||||
e._node.tr[subrow].className = e._node.tr[subrow].className.replace(/ hover/g, '');
|
||||
this.hoveredNode = null;
|
||||
}
|
||||
if (e._node.col_tr)
|
||||
{
|
||||
if (hover)
|
||||
|
|
Loading…
Reference in New Issue