PDA

View Full Version : Adjusting the animation speed of a body.scroll



Michael_Catalani
10 Jun 2014, 10:30 AM
Our sales department has a large video monitor on a wall that displays the current ranking of the sales team. We're using an animated dataview view on a panel, which allows us to move the team members up or down the rankings using animation. I use the Ext.ux.DataView.Animated mixin on the dataview, and can easily manipulate the animation speed for the dataview animation.

We can only display 14 of the more than 2 dozen sales team members at a time within the panel. So periodically I will scroll the panel to the bottom of the list using a body.scroll with animation.

Ext.getCmp('MyPanel').body.scroll('bottom', Infinity, true);

After a 10 second pause, I scroll the list back the top. The scrolling works fine, but is a bit too fast. How does one change the animation speed of a body.scroll to slow it down?

Thanks

mitchellsimoens
26 Jun 2014, 6:01 AM
Instead of a boolean, you can provide an object:


{
duration : 5000 //# of milliseconds
}

Default is 250 I believe

Michael_Catalani
27 Jun 2014, 4:47 AM
Thanks!