git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
04b51d3
)
Changed the default easing function
author
Stefan Petre
<stefan.petre@gmail.com>
Fri, 5 Jan 2007 06:40:38 +0000
(06:40 +0000)
committer
Stefan Petre
<stefan.petre@gmail.com>
Fri, 5 Jan 2007 06:40:38 +0000
(06:40 +0000)
src/fx/fx.js
patch
|
blob
|
history
diff --git
a/src/fx/fx.js
b/src/fx/fx.js
index
be8aee8
..
9aa17a9
100644
(file)
--- a/
src/fx/fx.js
+++ b/
src/fx/fx.js
@@
-498,11
+498,11
@@
jQuery.extend({
var n = t - this.startTime;
// Figure out where in the animation we are and set the number
var p = n / z.o.duration;
var n = t - this.startTime;
// Figure out where in the animation we are and set the number
var p = n / z.o.duration;
- //if the easing exists the use it else use default linear easing
+ //if the easing function exists then use it else use default linear easing
if (jQuery.easing[z.o.easing])
z.now = jQuery.easing[z.o.easing](p, n, firstNum, (lastNum-firstNum), z.o.duration);
else
if (jQuery.easing[z.o.easing])
z.now = jQuery.easing[z.o.easing](p, n, firstNum, (lastNum-firstNum), z.o.duration);
else
- z.now = jQuery.easingLinear(p, n, firstNum, (lastNum-firstNum), z.o.duration);
+ z.now = ((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum;
// Perform the next step of the animation
z.a();
// Perform the next step of the animation
z.a();
@@
-511,11
+511,6
@@
jQuery.extend({
},
},
- easingLinear : function(p, n, firstNum, delta, duration) {
- var nm, m, a, s;
- return ((-Math.cos(p*Math.PI)/2) + 0.5) * delta + firstNum;
- },
-
/**
*
* @param Integer p period step in animation
/**
*
* @param Integer p period step in animation
@@
-526,7
+521,6
@@
jQuery.extend({
*/
easing : {
linear: function(p, n, firstNum, delta, duration) {
*/
easing : {
linear: function(p, n, firstNum, delta, duration) {
- var nm, m, a, s;
return ((-Math.cos(p*Math.PI)/2) + 0.5) * delta + firstNum;
},
return ((-Math.cos(p*Math.PI)/2) + 0.5) * delta + firstNum;
},
@@
-571,7
+565,7
@@
jQuery.extend({
},
elasticin: function(p, n, firstNum, delta, duration) {
},
elasticin: function(p, n, firstNum, delta, duration) {
- var nm, m, a, s;
+ var a, s;
if (n == 0)
return firstNum;
if ((n/=duration)==1)
if (n == 0)
return firstNum;
if ((n/=duration)==1)
@@
-588,7
+582,7
@@
jQuery.extend({
},
elasticout:function(p, n, firstNum, delta, duration) {
},
elasticout:function(p, n, firstNum, delta, duration) {
- var nm, m, a, s;
+ var a, s;
if (n==0)
return firstNum;
if ((n/=duration/2)==2)
if (n==0)
return firstNum;
if ((n/=duration/2)==2)
@@
-605,7
+599,7
@@
jQuery.extend({
},
elasticboth: function(p, n, firstNum, delta, duration) {
},
elasticboth: function(p, n, firstNum, delta, duration) {
- var nm, m, a, s;
+ var a, s;
if (n==0)
return firstNum;
if ((n/=duration/2)==2)
if (n==0)
return firstNum;
if ((n/=duration/2)==2)