fix animated scroll in multiselect mode
This commit is contained in:
parent
38c97ee467
commit
ebafdd419d
3 changed files with 11 additions and 5 deletions
|
|
@ -105,7 +105,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
this.scrollBar = new ScrollBar(this.container);
|
||||
this.scrollBar.addEventListener("scroll", function(e) {
|
||||
if (!_self.$inScrollAnimation)
|
||||
if (!_self.$scrollAnimation)
|
||||
_self.session.setScrollTop(e.data);
|
||||
});
|
||||
|
||||
|
|
@ -1063,10 +1063,10 @@ var VirtualRenderer = function(container, theme) {
|
|||
|
||||
this.animateScrolling = function(fromValue, callback) {
|
||||
var toValue = this.scrollTop;
|
||||
if (this.$animatedScroll && Math.abs(fromValue - toValue) < 100000) {
|
||||
if (this.$animatedScroll) {
|
||||
var _self = this;
|
||||
var steps = _self.$calcSteps(fromValue, toValue);
|
||||
this.$inScrollAnimation = true;
|
||||
this.$scrollAnimation = {from: fromValue, to: toValue};
|
||||
|
||||
clearInterval(this.$timer);
|
||||
|
||||
|
|
@ -1083,7 +1083,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
} else {
|
||||
// do this on separate step to not get spurious scroll event from scrollbar
|
||||
_self.$timer = clearInterval(_self.$timer);
|
||||
_self.$inScrollAnimation = false;
|
||||
_self.$scrollAnimation = null;
|
||||
callback && callback();
|
||||
}
|
||||
}, 10);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue