fix formatting

This commit is contained in:
Fabian Jakobs 2011-02-18 11:56:25 +01:00
commit 0099165a85

View file

@ -634,17 +634,17 @@ var VirtualRenderer = function(container, theme) {
};
this.scrollToLine = function(line, center) {
var lineHeight = { lineHeight: this.lineHeight };
var offset = 0;
for (var l = 1; l < line; l++) {
offset += this.session.getRowHeight(lineHeight, l-1);
}
if (center) {
offset -= this.$size.scrollerHeight / 2;
}
this.scrollToY(offset);
};
var lineHeight = { lineHeight: this.lineHeight };
var offset = 0;
for (var l = 1; l < line; l++) {
offset += this.session.getRowHeight(lineHeight, l-1);
}
if (center) {
offset -= this.$size.scrollerHeight / 2;
}
this.scrollToY(offset);
};
this.scrollToY = function(scrollTop) {
var maxHeight = this.session.getScreenLength() * this.lineHeight - this.$size.scrollerHeight;
@ -777,4 +777,4 @@ var VirtualRenderer = function(container, theme) {
}).call(VirtualRenderer.prototype);
exports.VirtualRenderer = VirtualRenderer;
});
});