]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | /**\r |
2 | * @private\r | |
3 | */\r | |
4 | Ext.define('Ext.fx.easing.EaseIn', {\r | |
5 | extend: 'Ext.fx.easing.Linear',\r | |
6 | \r | |
7 | alias: 'easing.ease-in',\r | |
8 | \r | |
9 | config: {\r | |
10 | exponent: 4,\r | |
11 | duration: 1500\r | |
12 | },\r | |
13 | \r | |
14 | getValue: function() {\r | |
15 | var deltaTime = Ext.Date.now() - this.getStartTime(),\r | |
16 | duration = this.getDuration(),\r | |
17 | startValue = this.getStartValue(),\r | |
18 | endValue = this.getEndValue(),\r | |
19 | distance = this.distance,\r | |
20 | theta = deltaTime / duration,\r | |
21 | thetaEnd = Math.pow(theta, this.getExponent()),\r | |
22 | currentValue = startValue + (thetaEnd * distance);\r | |
23 | \r | |
24 | if (deltaTime >= duration) {\r | |
25 | this.isEnded = true;\r | |
26 | return endValue;\r | |
27 | }\r | |
28 | \r | |
29 | return currentValue;\r | |
30 | }\r | |
31 | });\r |