add missing options
This commit is contained in:
parent
fd2191e76e
commit
b61ae38c14
4 changed files with 25 additions and 13 deletions
|
|
@ -102,7 +102,6 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
// Indicates whether the horizontal scrollbar is visible
|
||||
this.$horizScroll = false;
|
||||
this.$horizScrollAlwaysVisible = false;
|
||||
|
||||
this.scrollBar = new ScrollBar(this.container);
|
||||
this.scrollBar.addEventListener("scroll", function(e) {
|
||||
|
|
@ -615,7 +614,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
* @returns {Boolean}
|
||||
**/
|
||||
this.getHScrollBarAlwaysVisible = function() {
|
||||
return this.$horizScrollAlwaysVisible;
|
||||
return this.$hScrollBarAlwaysVisible;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -625,11 +624,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
*
|
||||
**/
|
||||
this.setHScrollBarAlwaysVisible = function(alwaysVisible) {
|
||||
if (this.$horizScrollAlwaysVisible != alwaysVisible) {
|
||||
this.$horizScrollAlwaysVisible = alwaysVisible;
|
||||
if (!this.$horizScrollAlwaysVisible || !this.$horizScroll)
|
||||
this.$loop.schedule(this.CHANGE_SCROLL);
|
||||
}
|
||||
this.setOption("hScrollBarAlwaysVisible", alwaysVisible);
|
||||
};
|
||||
|
||||
this.$updateScrollBar = function() {
|
||||
|
|
@ -744,7 +739,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
var longestLine = this.$getLongestLine();
|
||||
|
||||
var horizScroll = this.$horizScrollAlwaysVisible || this.$size.scrollerWidth - longestLine < 0;
|
||||
var horizScroll = this.$hScrollBarAlwaysVisible || this.$size.scrollerWidth - longestLine < 0;
|
||||
var horizScrollChanged = this.$horizScroll !== horizScroll;
|
||||
this.$horizScroll = horizScroll;
|
||||
if (horizScrollChanged) {
|
||||
|
|
@ -1398,6 +1393,14 @@ config.defineOptions(VirtualRenderer.prototype, "renderer", {
|
|||
},
|
||||
initialValue: false,
|
||||
value: true
|
||||
},
|
||||
hScrollBarAlwaysVisible: {
|
||||
set: function(alwaysVisible) {
|
||||
this.$hScrollBarAlwaysVisible = alwaysVisible;
|
||||
if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll)
|
||||
this.$loop.schedule(this.CHANGE_SCROLL);
|
||||
},
|
||||
initialValue: false
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue