completely remove top/bottom padding since it causes too many scroll problems

This commit is contained in:
Fabian Jakobs 2010-11-03 18:42:08 +01:00
commit 63eb385ef5

View file

@ -298,7 +298,7 @@ var VirtualRenderer = function(container, theme) {
};
this.$updateScrollBar = function() {
this.scrollBar.setInnerHeight(this.doc.getLength() * this.lineHeight + this.$padding);
this.scrollBar.setInnerHeight(this.doc.getLength() * this.lineHeight);
this.scrollBar.setScrollTop(this.scrollTop);
};
@ -522,10 +522,7 @@ var VirtualRenderer = function(container, theme) {
};
this.scrollToY = function(scrollTop) {
var maxHeight = this.lines.length * this.lineHeight - this.$size.scrollerHeight + this.$padding;
if (scrollTop >= maxHeight - this.$padding)
scrollTop = maxHeight;
var maxHeight = this.lines.length * this.lineHeight - this.$size.scrollerHeight;
var scrollTop = Math.max(0, Math.min(maxHeight, scrollTop));
if (this.scrollTop !== scrollTop) {