* Tweaked animation

This commit is contained in:
Ruben Daniels 2012-04-03 15:48:16 -07:00
commit b47b0e9225

View file

@ -700,11 +700,11 @@ var VirtualRenderer = function(container, theme) {
//@todo I would like to make this animation a setting. How?
var STEPS = 9;
var STEPS = 15;
function calcSteps(fromValue, toValue){
var i = 0,
l = STEPS - 1,
steps = [fromValue],
l = STEPS,
steps = [],
func = function(t, x_min, dx) {
if ((t /= .5) < 1)
return dx / 2 * Math.pow(t, 3) + x_min;
@ -725,7 +725,7 @@ var VirtualRenderer = function(container, theme) {
offset -= this.$size.scrollerHeight / 2;
var i = 0, _self = this,
steps = calcSteps(this.scrollTop, offset); console.dir(steps);
steps = calcSteps(this.scrollTop, offset);// console.dir(steps);
clearInterval(_self.$timer);
this.$timer = setInterval(function(){
_self.session.setScrollTop(steps[i]);