scrollPastEnd

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

View file

@ -864,6 +864,9 @@ var VirtualRenderer = function(container, theme) {
this.scrollBarH.setVisible(horizScroll); this.scrollBarH.setVisible(horizScroll);
} }
if (!this.$maxLines && this.$scrollPastEnd)
maxHeight += (this.$size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd;
var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible || var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible ||
this.$size.scrollerHeight - maxHeight < 0); this.$size.scrollerHeight - maxHeight < 0);
var vScrollChanged = this.$vScroll !== vScroll; var vScrollChanged = this.$vScroll !== vScroll;
@ -1579,9 +1582,23 @@ config.defineOptions(VirtualRenderer.prototype, "renderer", {
} }
}, },
minLines: { minLines: {
set: function(name) { set: function(val) {
this.updateFull(); 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
} }
}); });