Skip to content

Commit

Permalink
Performance improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
freein committed Nov 3, 2014
1 parent 7e89d78 commit c556faf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/js/core/directives/ui-grid-native-scrollbar.js
Expand Up @@ -80,7 +80,8 @@
// Update the vertical scrollbar's content height so it's the same as the canvas
var contentHeight = rowContainer.getCanvasHeight();

var headerHeight = gridUtil.outerElementHeight(containerCtrl.header);
//var headerHeight = gridUtil.outerElementHeight(containerCtrl.header);
var headerHeight = colContainer.headerHeight ? colContainer.headerHeight : grid.headerHeight;

// gridUtil.logDebug('headerHeight in scrollbar', headerHeight);

Expand Down
7 changes: 5 additions & 2 deletions src/js/core/factories/GridOptions.js
Expand Up @@ -128,8 +128,11 @@ angular.module('ui.grid')
baseOptions.getRowIdentity = baseOptions.getRowIdentity || function getRowIdentity(row) {
return row.$$hashKey;
};

baseOptions.headerRowHeight = typeof(baseOptions.headerRowHeight) !== "undefined" ? baseOptions.headerRowHeight : 30;
if (baseOptions.hideHeader){
baseOptions.headerRowHeight = 0;
}else {
baseOptions.headerRowHeight = typeof(baseOptions.headerRowHeight) !== "undefined" ? baseOptions.headerRowHeight : 30;
}
baseOptions.rowHeight = baseOptions.rowHeight || 30;
baseOptions.maxVisibleRowCount = baseOptions.maxVisibleRowCount || 200;

Expand Down

0 comments on commit c556faf

Please sign in to comment.