remove redundant getRowHeight method
This commit is contained in:
parent
2d0b6fc49f
commit
f976663150
4 changed files with 9 additions and 21 deletions
|
|
@ -775,7 +775,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
// Map lines on the screen to lines in the document.
|
||||
var firstRowScreen, firstRowHeight;
|
||||
var lineHeight = { lineHeight: this.lineHeight };
|
||||
var lineHeight = this.lineHeight;
|
||||
firstRow = session.screenToDocumentRow(firstRow, 0);
|
||||
|
||||
// Check if firstRow is inside of a foldLine. If true, then use the first
|
||||
|
|
@ -786,13 +786,13 @@ var VirtualRenderer = function(container, theme) {
|
|||
}
|
||||
|
||||
firstRowScreen = session.documentToScreenRow(firstRow, 0);
|
||||
firstRowHeight = session.getRowHeight(lineHeight, firstRow);
|
||||
firstRowHeight = session.getRowLength(firstRow) * lineHeight;
|
||||
|
||||
lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1);
|
||||
minHeight = this.$size.scrollerHeight + session.getRowHeight(lineHeight, lastRow)+
|
||||
minHeight = this.$size.scrollerHeight + session.getRowLength(lastRow) * lineHeight +
|
||||
firstRowHeight;
|
||||
|
||||
offset = this.scrollTop - firstRowScreen * this.lineHeight;
|
||||
offset = this.scrollTop - firstRowScreen * lineHeight;
|
||||
|
||||
this.layerConfig = {
|
||||
width : longestLine,
|
||||
|
|
@ -800,7 +800,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
firstRow : firstRow,
|
||||
firstRowScreen: firstRowScreen,
|
||||
lastRow : lastRow,
|
||||
lineHeight : this.lineHeight,
|
||||
lineHeight : lineHeight,
|
||||
characterWidth : this.characterWidth,
|
||||
minHeight : minHeight,
|
||||
maxHeight : maxHeight,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue