*/
ensureVisible : function(row, col, hscroll)
{
- Roo.log('GridView.ensureVisible,' + row + ',' + col);
+ //Roo.log('GridView.ensureVisible,' + row + ',' + col);
//return null; //disable for testing.
if(typeof row != "number"){
row = row.rowIndex;
var sleft = parseInt(c.scrollLeft, 10);
var sbot = stop + ch;
var sright = sleft + c.clientWidth;
-
+ /*
Roo.log('GridView.ensureVisible:' +
' ctop:' + ctop +
' c.clientHeight:' + c.clientHeight +
' sbot:' + sbot +
' ch:' + ch
);
-
- if(ctop <= stop){
- // c.scrollTop = ctop;
- Roo.log("set scrolltop to ctop DISABLE?");
+ */
+ if(ctop < stop){
+ c.scrollTop = ctop;
+ //Roo.log("set scrolltop to ctop DISABLE?");
}else if(cbot > sbot){
- Roo.log("set scrolltop to cbot-ch");
+ //Roo.log("set scrolltop to cbot-ch");
c.scrollTop = cbot-ch;
}
-
+
if(hscroll !== false){
if(cleft < sleft){
c.scrollLeft = cleft;