aboutsummaryrefslogtreecommitdiffstats
path: root/src/effects/Tween.js
diff options
context:
space:
mode:
authorThomas Tortorini <thomastortorini@gmail.com>2015-06-27 17:18:21 +0200
committerMichał Gołębiowski <m.goleb@gmail.com>2015-09-07 22:07:32 +0200
commitb7a7dea95f84d6d8e5a8186d4fb09a762baf79bb (patch)
tree64da77ffa79a437c5d89df317e2491566da351af /src/effects/Tween.js
parentc9cf250daafe806818da1dd207a88a8e94a4ad16 (diff)
downloadjquery-b7a7dea95f84d6d8e5a8186d4fb09a762baf79bb.tar.gz
jquery-b7a7dea95f84d6d8e5a8186d4fb09a762baf79bb.zip
Effects: Remove additional parameters of easings
Fixes gh-2367 Closes gh-2376
Diffstat (limited to 'src/effects/Tween.js')
-rw-r--r--src/effects/Tween.js15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/effects/Tween.js b/src/effects/Tween.js
index d26ddd918..47f15a947 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 );