Skip to content

Commit

Permalink
fix(core): Fix #4776 scrollTo doesn't work with higher rowHeight
Browse files Browse the repository at this point in the history
Change the way pixelsToSeeRow variable is calculated. This way
is possible to have different heights for rows and column headers.
  • Loading branch information
imbalind committed Nov 27, 2015
1 parent f715767 commit 0d7d37b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/core/factories/Grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -2332,7 +2332,7 @@ angular.module('ui.grid')
//}

// This is the minimum amount of pixels we need to scroll vertical in order to see this row.
var pixelsToSeeRow = ((seekRowIndex + 1) * self.options.rowHeight);
var pixelsToSeeRow = (seekRowIndex * self.options.rowHeight + self.headerHeight);

// Don't let the pixels required to see the row be less than zero
pixelsToSeeRow = (pixelsToSeeRow < 0) ? 0 : pixelsToSeeRow;
Expand Down

0 comments on commit 0d7d37b

Please sign in to comment.