]> git.proxmox.com Git - sencha-touch.git/blob - src/src/fx/easing/EaseOut.js
import Sencha Touch 2.4.2 source
[sencha-touch.git] / src / src / fx / easing / EaseOut.js
1 /**
2 * @private
3 */
4 Ext.define('Ext.fx.easing.EaseOut', {
5 extend: 'Ext.fx.easing.Linear',
6
7 alias: 'easing.ease-out',
8
9 config: {
10 exponent: 4,
11 duration: 1500
12 },
13
14 getValue: function() {
15 var deltaTime = Ext.Date.now() - this.getStartTime(),
16 duration = this.getDuration(),
17 startValue = this.getStartValue(),
18 endValue = this.getEndValue(),
19 distance = this.distance,
20 theta = deltaTime / duration,
21 thetaC = 1 - theta,
22 thetaEnd = 1 - Math.pow(thetaC, this.getExponent()),
23 currentValue = startValue + (thetaEnd * distance);
24
25 if (deltaTime >= duration) {
26 this.isEnded = true;
27 return endValue;
28 }
29
30 return currentValue;
31 }
32 });