important
This commit is contained in:
parent
7d74526c60
commit
6f926e8e33
1 changed files with 13 additions and 14 deletions
|
|
@ -471,12 +471,13 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
this.$computeLayerConfig = function() {
|
this.$computeLayerConfig = function() {
|
||||||
var session = this.session;
|
var session = this.session;
|
||||||
|
var config = this.layerConfig
|
||||||
|
|
||||||
var offset = this.scrollTop % this.lineHeight;
|
var offset = this.scrollTop % this.lineHeight;
|
||||||
var minHeight = this.$size.scrollerHeight + this.lineHeight;
|
var minHeight = this.$size.scrollerHeight + this.lineHeight;
|
||||||
|
|
||||||
var longestLine = this.$getLongestLine();
|
var longestLine = this.$getLongestLine();
|
||||||
var widthChanged = this.layerConfig.width != longestLine;
|
var widthChanged = config.width != longestLine;
|
||||||
|
|
||||||
var horizScroll = this.$horizScrollAlwaysVisible || this.$size.scrollerWidth - longestLine < 0;
|
var horizScroll = this.$horizScrollAlwaysVisible || this.$size.scrollerWidth - longestLine < 0;
|
||||||
var horizScrollChanged = this.$horizScroll !== horizScroll;
|
var horizScrollChanged = this.$horizScroll !== horizScroll;
|
||||||
|
|
@ -512,19 +513,17 @@ var VirtualRenderer = function(container, theme) {
|
||||||
|
|
||||||
offset = this.scrollTop - firstRowScreen * this.lineHeight;
|
offset = this.scrollTop - firstRowScreen * this.lineHeight;
|
||||||
|
|
||||||
this.layerConfig = {
|
config.width = longestLine;
|
||||||
width : longestLine,
|
config.padding = this.$padding;
|
||||||
padding : this.$padding,
|
config.firstRow = firstRow;
|
||||||
firstRow : firstRow,
|
config.firstRowScreen = firstRowScreen;
|
||||||
firstRowScreen: firstRowScreen,
|
config.lastRow = lastRow;
|
||||||
lastRow : lastRow,
|
config.lineHeight = this.lineHeight;
|
||||||
lineHeight : this.lineHeight,
|
config.characterWidth = this.characterWidth;
|
||||||
characterWidth : this.characterWidth,
|
config.minHeight = minHeight;
|
||||||
minHeight : minHeight,
|
config.maxHeight = maxHeight;
|
||||||
maxHeight : maxHeight,
|
config.offset = offset;
|
||||||
offset : offset,
|
config.height = this.$size.scrollerHeight;
|
||||||
height : this.$size.scrollerHeight
|
|
||||||
};
|
|
||||||
|
|
||||||
// For debugging.
|
// For debugging.
|
||||||
// console.log(JSON.stringify(this.layerConfig));
|
// console.log(JSON.stringify(this.layerConfig));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue