]> git.proxmox.com Git - extjs.git/blob - extjs/packages/core/src/fx/easing/EaseIn.js
add extjs 6.0.1 sources
[extjs.git] / extjs / packages / core / src / fx / easing / EaseIn.js
1 /**
2 * @private
3 */
4 Ext.define('Ext.fx.easing.EaseIn', {
5 extend: 'Ext.fx.easing.Linear',
6
7 alias: 'easing.ease-in',
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 thetaEnd = Math.pow(theta, this.getExponent()),
22 currentValue = startValue + (thetaEnd * distance);
23
24 if (deltaTime >= duration) {
25 this.isEnded = true;
26 return endValue;
27 }
28
29 return currentValue;
30 }
31 });