fix bug with scrollMargin and maxLines

This commit is contained in:
nightwing 2014-01-30 21:26:35 +04:00
commit f6983739e9

View file

@ -931,10 +931,10 @@ var VirtualRenderer = function(container, theme) {
}
this.session.setScrollTop(Math.max(-this.scrollMargin.top,
Math.min(this.scrollTop, maxHeight - size.scrollerHeight + this.scrollMargin.v)));
Math.min(this.scrollTop, maxHeight - size.scrollerHeight + this.scrollMargin.bottom)));
this.session.setScrollLeft(Math.max(-this.scrollMargin.left, Math.min(this.scrollLeft,
longestLine + 2 * this.$padding - size.scrollerWidth + this.scrollMargin.h)));
longestLine + 2 * this.$padding - size.scrollerWidth + this.scrollMargin.right)));
var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;
var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));