fix regression with horizontal scrolling
This commit is contained in:
parent
a673864f38
commit
00bc66fd9a
1 changed files with 5 additions and 3 deletions
|
|
@ -646,12 +646,14 @@ var VirtualRenderer = function(container, theme) {
|
|||
var scrollLeft = this.scroller.scrollLeft;
|
||||
|
||||
if (scrollLeft > left) {
|
||||
if (left < this.$padding + 2 * this.layerConfig.characterWidth)
|
||||
left = 0;
|
||||
this.scrollToX(left);
|
||||
}
|
||||
|
||||
if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) {
|
||||
if (left > this.layerConfig.width)
|
||||
this.$desiredScrollLeft = left + 2 * this.characterWidth;
|
||||
if (left > this.layerConfig.width + 2 * this.$padding)
|
||||
this.$desiredScrollLeft = left;
|
||||
else
|
||||
this.scrollToX(Math.round(left + this.characterWidth - this.$size.scrollerWidth));
|
||||
}
|
||||
|
|
@ -701,7 +703,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
};
|
||||
|
||||
this.scrollToX = function(scrollLeft) {
|
||||
if (scrollLeft <= this.$padding + 2 * this.layerConfig.characterWidth)
|
||||
if (scrollLeft <= this.$padding)
|
||||
scrollLeft = 0;
|
||||
|
||||
this.scroller.scrollLeft = scrollLeft;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue