scrollPastEnd

This commit is contained in:
nightwing 2013-07-07 12:48:53 +04:00
commit b97496009b

View file

@ -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
}
});