* Tweaked animation
This commit is contained in:
parent
c93c8d5d7f
commit
b47b0e9225
1 changed files with 4 additions and 4 deletions
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue