remove redundant getRowHeight method

This commit is contained in:
nightwing 2012-07-29 15:04:40 +04:00
commit f976663150
4 changed files with 9 additions and 21 deletions

View file

@ -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,