Author: konstantin.mishin
Date: 2007-09-13 09:00:05 -0400 (Thu, 13 Sep 2007)
New Revision: 2926
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
Log:
RF-873
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
---
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-09-13
12:58:33 UTC (rev 2925)
+++
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-09-13
13:00:05 UTC (rev 2926)
@@ -784,12 +784,12 @@
},
_calcDefaultRowHeight: function() {
- //var templNormal = this.templNormal.getElement();
- // var height = Math.ceil(templNormal.offsetHeight / templNormal.rows.length);
- var height = (this.templNormal && this.templNormal.getElement() &&
- this.templNormal.getElement().rows &&
- this.templNormal.getElement().rows.length>1) ?
this.templNormal.getElement().rows[1].offsetTop : 16;
- return height;
-
+ var templNormal = this.templNormal.getElement();
+ var length = templNormal.rows.length;
+ if (length) {
+ return Math.ceil(templNormal.offsetHeight / length);
+ } else {
+ return 16;
+ }
}
});
Show replies by date