fix first row calculation
This commit is contained in:
parent
3e1eb8d592
commit
ce6e512e9c
1 changed files with 1 additions and 1 deletions
|
|
@ -376,7 +376,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
var widthChanged = !this.layerConfig ? true : (this.layerConfig.width != longestLine);
|
||||
|
||||
var lineCount = Math.ceil(minHeight / this.lineHeight);
|
||||
var firstRow = Math.round((this.scrollTop - offset) / this.lineHeight);
|
||||
var firstRow = Math.max(Math.round((this.scrollTop - offset) / this.lineHeight, 0));
|
||||
var lastRow = Math.min(this.lines.length, firstRow + lineCount) - 1;
|
||||
|
||||
var layerConfig = this.layerConfig = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue