diff options
author | Thomas Tortorini <thomastortorini@gmail.com> | 2015-06-27 17:18:21 +0200 |
---|---|---|
committer | Michał Gołębiowski <m.goleb@gmail.com> | 2015-09-07 22:15:09 +0200 |
commit | 41a04e59df5beac4ca61b3b5e3a6b078b6aee1ac (patch) | |
tree | de2984d13da065691e5e433013b37e7e5631d6f7 /src | |
parent | cbb0be6c41221ba3dae280aee07815007b127982 (diff) | |
download | jquery-41a04e59df5beac4ca61b3b5e3a6b078b6aee1ac.tar.gz jquery-41a04e59df5beac4ca61b3b5e3a6b078b6aee1ac.zip |
Effects: Remove additional parameters of easings
(cherry-picked from b7a7dea95f84d6d8e5a8186d4fb09a762baf79bb)
Fixes gh-2367
Closes gh-2376
Diffstat (limited to 'src')
-rw-r--r-- | src/effects/Tween.js | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/effects/Tween.js b/src/effects/Tween.js index 33edf10f3..4e85e3c51 100644 --- a/src/effects/Tween.js +++ b/src/effects/Tween.js @@ -27,17 +27,12 @@ Tween.prototype = { Tween.propHooks._default.get( this ); }, run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; + var hooks = Tween.propHooks[ this.prop ]; - 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; + this.pos = this.options.duration ? + jQuery.easing[ this.easing ]( percent ) : + percent; + this.now = ( this.end - this.start ) * this.pos + this.start; if ( this.options.step ) { this.options.step.call( this.elem, this.now, this ); |