completely remove top/bottom padding since it causes too many scroll problems
This commit is contained in:
parent
aeb3e63e31
commit
63eb385ef5
1 changed files with 2 additions and 5 deletions
|
|
@ -298,7 +298,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$updateScrollBar = function() {
|
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);
|
this.scrollBar.setScrollTop(this.scrollTop);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -522,10 +522,7 @@ var VirtualRenderer = function(container, theme) {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.scrollToY = function(scrollTop) {
|
this.scrollToY = function(scrollTop) {
|
||||||
var maxHeight = this.lines.length * this.lineHeight - this.$size.scrollerHeight + this.$padding;
|
var maxHeight = this.lines.length * this.lineHeight - this.$size.scrollerHeight;
|
||||||
if (scrollTop >= maxHeight - this.$padding)
|
|
||||||
scrollTop = maxHeight;
|
|
||||||
|
|
||||||
var scrollTop = Math.max(0, Math.min(maxHeight, scrollTop));
|
var scrollTop = Math.max(0, Math.min(maxHeight, scrollTop));
|
||||||
|
|
||||||
if (this.scrollTop !== scrollTop) {
|
if (this.scrollTop !== scrollTop) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue