Created
May 20, 2013 15:49
-
-
Save dmachi/5613121 to your computer and use it in GitHub Desktop.
select visible nodes in a dgrid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dh = domGeom.getMarginBox(grid.contentNode).h; | |
var scrollPos = grid.getScrollPosition(); | |
var rows = Query(".dgrid-row",grid.contentNode).filter(function(node){ | |
return ((node.offsetTop>=scrollPos.y) && ((node.offsetTop + (.75 * node.offsetHeight)) <(scrollPos.y+dh))); | |
}); | |
grid.clearSelection(); | |
grid.select(rows[0], rows[rows.length-1]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment