This commit is contained in:
Ruben Daniels 2012-04-02 19:14:53 -07:00
commit c93c8d5d7f

View file

@ -700,7 +700,7 @@ var VirtualRenderer = function(container, theme) {
//@todo I would like to make this animation a setting. How?
var STEPS = 15;
var STEPS = 9;
function calcSteps(fromValue, toValue){
var i = 0,
l = STEPS - 1,
@ -725,12 +725,12 @@ var VirtualRenderer = function(container, theme) {
offset -= this.$size.scrollerHeight / 2;
var i = 0, _self = this,
steps = calcSteps(this.scrollTop, offset);
steps = calcSteps(this.scrollTop, offset); console.dir(steps);
clearInterval(_self.$timer);
this.$timer = setInterval(function(){
_self.session.setScrollTop(steps[i]);
if (++i == STEPS)
if (++i == STEPS + 1)
clearInterval(_self.$timer);
}, 10);
};