recompute longestLine when vScroll changes
This commit is contained in:
parent
7f8a47939c
commit
abf5f7492f
1 changed files with 10 additions and 7 deletions
|
|
@ -925,6 +925,16 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
offset = this.scrollTop - firstRowScreen * lineHeight;
|
||||
|
||||
var changes = 0;
|
||||
// Horizontal scrollbar visibility may have changed, which changes
|
||||
// the client height of the scroller
|
||||
if (hScrollChanged || vScrollChanged) {
|
||||
changes = this.$updateCachedSize(true, this.gutterWidth, this.$size.width, this.$size.height);
|
||||
this._signal("scrollbarVisibilityChanged");
|
||||
if (vScrollChanged)
|
||||
longestLine = this.$getLongestLine();
|
||||
}
|
||||
|
||||
this.layerConfig = {
|
||||
width : longestLine,
|
||||
padding : this.$padding,
|
||||
|
|
@ -947,13 +957,6 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.content.style.width = longestLine + 2 * this.$padding + "px";
|
||||
this.content.style.height = minHeight + "px";
|
||||
|
||||
var changes = 0;
|
||||
// Horizontal scrollbar visibility may have changed, which changes
|
||||
// the client height of the scroller
|
||||
if (hScrollChanged || vScrollChanged) {
|
||||
changes = this.$updateCachedSize(true, this.gutterWidth, this.$size.width, this.$size.height);
|
||||
this._signal("scrollbarVisibilityChanged");
|
||||
}
|
||||
return changes;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue