diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2015-12-22 14:32:03 +0300 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2015-12-22 14:32:03 +0300 |
commit | 268af5a092ba803dda6d95cd5655883c59a1cc70 (patch) | |
tree | 2f96c95d3308c52594f97fb13989c542a19462e8 /src/effects | |
parent | 079e0796aef76a384d99df3d9a398e9890af6991 (diff) | |
download | jquery-268af5a092ba803dda6d95cd5655883c59a1cc70.tar.gz jquery-268af5a092ba803dda6d95cd5655883c59a1cc70.zip |
Revert "Effects: Remove additional parameters of easings"
This reverts commit 41a04e59df5beac4ca61b3b5e3a6b078b6aee1ac.
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/Tween.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/effects/Tween.js b/src/effects/Tween.js index 4e85e3c51..33edf10f3 100644 --- a/src/effects/Tween.js +++ b/src/effects/Tween.js @@ -27,12 +27,17 @@ Tween.prototype = { Tween.propHooks._default.get( this ); }, run: function( percent ) { - var hooks = Tween.propHooks[ this.prop ]; + var eased, + hooks = Tween.propHooks[ this.prop ]; - this.pos = this.options.duration ? - jQuery.easing[ this.easing ]( percent ) : - percent; - this.now = ( this.end - this.start ) * this.pos + this.start; + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; if ( this.options.step ) { this.options.step.call( this.elem, this.now, this ); |