Skip to content

Commit

Permalink
Merge pull request deitch#120 from side-by-side/patch-hovering
Browse files Browse the repository at this point in the history
Hover whole row when mouse moves inside any grid column.
  • Loading branch information
deitch committed Nov 17, 2015
2 parents 2bde656 + 00d7b08 commit 1b9943d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions jstreegrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,12 @@
}
};
},
hoverInHandler = function (node, jsTreeInstance) {
return function() { jsTreeInstance.hover_node(node); }
},
hoverOutHandler = function (node, jsTreeInstance) {
return function() { jsTreeInstance.dehover_node(node); }
},
i, val, cl, wcl, ccl, a, last, valClass, wideValClass, span, paddingleft, title, gridCellName, gridCellParentId, gridCellParent,
gridCellPrev, gridCellPrevId, gridCellNext, gridCellNextId, gridCellChild, gridCellChildId,
col, content, tmpWidth, dataRow = this.dataRow, dataCell, lid = objData.id,
Expand Down Expand Up @@ -761,6 +767,7 @@
// add click handler for clicking inside a grid cell
last.click(cellClickHandler(tree,t,val,col,this));
last.on("contextmenu",cellRightClickHandler(tree,t,val,col,this));
last.hover(hoverInHandler(t, this), hoverOutHandler(t, this));

if (title) {
span.attr("title",title);
Expand Down

0 comments on commit 1b9943d

Please sign in to comment.