scrollPastEnd
This commit is contained in:
parent
65713e974b
commit
b97496009b
1 changed files with 19 additions and 2 deletions
|
|
@ -848,7 +848,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
var hideScrollbars = this.$size.height <= 2 * this.lineHeight;
|
||||
var screenLines = this.session.getScreenLength()
|
||||
var maxHeight = screenLines * this.lineHeight;
|
||||
var maxHeight = screenLines * this.lineHeight;
|
||||
|
||||
var offset = this.scrollTop % this.lineHeight;
|
||||
var minHeight = this.$size.scrollerHeight + this.lineHeight;
|
||||
|
|
@ -864,6 +864,9 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.scrollBarH.setVisible(horizScroll);
|
||||
}
|
||||
|
||||
if (!this.$maxLines && this.$scrollPastEnd)
|
||||
maxHeight += (this.$size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd;
|
||||
|
||||
var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible ||
|
||||
this.$size.scrollerHeight - maxHeight < 0);
|
||||
var vScrollChanged = this.$vScroll !== vScroll;
|
||||
|
|
@ -1579,9 +1582,23 @@ config.defineOptions(VirtualRenderer.prototype, "renderer", {
|
|||
}
|
||||
},
|
||||
minLines: {
|
||||
set: function(name) {
|
||||
set: function(val) {
|
||||
this.updateFull();
|
||||
}
|
||||
},
|
||||
scrollPastEnd: {
|
||||
set: function(val) {
|
||||
if (val == true)
|
||||
val = 1;
|
||||
else if (val == false)
|
||||
val = 0;
|
||||
if (this.$scrollPastEnd == val)
|
||||
return;
|
||||
this.$scrollPastEnd = val;
|
||||
this.$loop.schedule(this.CHANGE_SCROLL);
|
||||
},
|
||||
initialValue: 1,
|
||||
handlesSet: true
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue