Skip to content

armgit / GSAP

Public Imported from GitHub
0

GSAP (GreenSock Animation Platform): high-performance JavaScript animation for anything JavaScript can touch. 100% free, including every plugin.

Minor update to jquery.gsap.js plugin (0.1.1)

Jack Doylea05263290632
diff --git a/src/minified/jquery.gsap.min.js b/src/minified/jquery.gsap.min.js
index 7001fd0..ed44001 100644
--- a/src/minified/jquery.gsap.min.js
+++ b/src/minified/jquery.gsap.min.js
@@ -1,6 +1,6 @@
/*!
- * VERSION: 0.1.0
- * DATE: 2013-01-24
+ * VERSION: 0.1.1
+ * DATE: 2013-01-25
* JavaScript
* UPDATES AND DOCS AT: http://www.greensock.com/jquery-gsap-plugin/
*
@@ -14,4 +14,4 @@
*
* @author: Jack Doyle, [email protected]
*/
-(function(a){"use strict";var e,f,g,b=a.fn.animate,c=a.fn.stop,d=!0,h=function(a,b){a&&this.each(a),b()},i=function(a,b,c,d,e){(b||e)&&(d[a]=e?h:c.each,d[a+"Scope"]=c,d[a+"Params"]=e?[b,e]:[b])},j={overwrite:1,delay:1,useFrames:1,runBackwards:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,autoCSS:1},k=function(a,b){for(var c in j)j[c]&&void 0!==a[c]&&(b[c]=a[c])},l=function(a){return function(b){return a.getRatio(b)}},m={},n=function(){var c,d,b=window.GreenSockGlobals||window;if(e=b.TweenMax||b.TweenLite,f=b.CSSPlugin,e&&(c=(e.version+".0.0").split("."),d=!(Number(c[0])>0&&Number(c[1])>7)),!e||!f||d)return e=null,!g&&window.console&&(window.console.log("The jquery.gsap.js plugin requires the TweenMax (or at least TweenLite and CSSPlugin) JavaScript file(s)."+(d?" Version "+c.join(".")+" is too old.":"")),g=!0),void 0;if(m=b.Ease.map,m&&a.easing){for(var h in m)a.easing[h]=l(m[h]);n=!1}};a.fn.animate=function(c,g,h,j){if(c=c||{},n&&(n(),!e||!f))return b.call(this,c,g,h,j);if(!d||c.skipGSAP===!0)return b.call(this,c,g,h,j);var r,s,t,u,v,l=a.speed(g,h,j),o={ease:m[l.easing]||m.swing},p=this,q="object"==typeof g?g.specialEasing:null;for(t in c)s=c[t],s instanceof Array&&m[s[1]]&&(q=q||{},q[t]=s[1],s=s[0]),"toggle"===s||"hide"===s||"show"===s?(r=r||{},r[t]=s):o[-1===t.indexOf("-")?t:a.camelCase(t)]=s;if("object"==typeof g&&"function"==typeof g.step&&i("onUpdate",g.step,p,o),q){v=[];for(t in q)s=v[v.length]={},k(o,s),s.ease=m[q[t]]||o.ease,-1!==t.indexOf("-")&&(t=a.camelCase(t)),s[t]=o[t];0===v.length&&(v=null)}return u=function(c){if(i("onComplete",l.old,p,o,c),v)for(var d=v.length;--d>-1;)e.to(p,a.fx.off?0:l.duration/1e3,v[d]);e.to(p,a.fx.off?0:l.duration/1e3,o),r&&b.call(p,r,{duration:l.duration,easing:l.easing,queue:!1})},l.queue!==!1?p.queue(l.queue,u):u(),p},a.fn.stop=function(a,b){if(c.call(this,a,b),e){if(b)for(var g,d=e.getTweensOf(this),f=d.length;--f>-1;)g=d[f].totalTime()/d[f].totalDuration(),g>0&&1>g&&d[f].seek(d[f].totalDuration());e.killTweensOf(this)}return this},a.gsap={enabled:function(a){d=a},version:"0.1.0"}})(jQuery);
\ No newline at end of file
+(function(a){"use strict";var e,f,g,b=a.fn.animate,c=a.fn.stop,d=!0,h=function(a,b){"function"==typeof a&&this.each(a),b()},i=function(a,b,c,d,e){e="function"==typeof e?e:null,b="function"==typeof b?b:null,(b||e)&&(d[a]=e?h:c.each,d[a+"Scope"]=c,d[a+"Params"]=e?[b,e]:[b])},j={overwrite:1,delay:1,useFrames:1,runBackwards:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,autoCSS:1},k=function(a,b){for(var c in j)j[c]&&void 0!==a[c]&&(b[c]=a[c])},l=function(a){return function(b){return a.getRatio(b)}},m={},n=function(){var c,d,b=window.GreenSockGlobals||window;if(e=b.TweenMax||b.TweenLite,f=b.CSSPlugin,e&&(c=(e.version+".0.0").split("."),d=!(Number(c[0])>0&&Number(c[1])>7)),!e||!f||d)return e=null,!g&&window.console&&(window.console.log("The jquery.gsap.js plugin requires the TweenMax (or at least TweenLite and CSSPlugin) JavaScript file(s)."+(d?" Version "+c.join(".")+" is too old.":"")),g=!0),void 0;if(m=b.Ease.map,m&&a.easing){for(var h in m)a.easing[h]=l(m[h]);n=!1}};a.fn.animate=function(c,g,h,j){if(c=c||{},n&&(n(),!e||!f))return b.call(this,c,g,h,j);if(!d||c.skipGSAP===!0)return b.call(this,c,g,h,j);var r,s,t,u,v,l=a.speed(g,h,j),o={ease:m[l.easing]||(l.easing===!1?m.linear:m.swing)},p=this,q="object"==typeof g?g.specialEasing:null;for(t in c)s=c[t],s instanceof Array&&m[s[1]]&&(q=q||{},q[t]=s[1],s=s[0]),"toggle"===s||"hide"===s||"show"===s?(r=r||{},r[t]=s):o[-1===t.indexOf("-")?t:a.camelCase(t)]=s;if("object"==typeof g&&"function"==typeof g.step&&i("onUpdate",g.step,p,o),q){v=[];for(t in q)s=v[v.length]={},k(o,s),s.ease=m[q[t]]||o.ease,-1!==t.indexOf("-")&&(t=a.camelCase(t)),s[t]=o[t];0===v.length&&(v=null)}return u=function(c){if(i("onComplete",l.old,p,o,c),v)for(var d=v.length;--d>-1;)e.to(p,a.fx.off?0:l.duration/1e3,v[d]);e.to(p,a.fx.off?0:l.duration/1e3,o),r&&b.call(p,r,{duration:l.duration,easing:l.easing,queue:!1})},l.queue!==!1?p.queue(l.queue,u):u(),p},a.fn.stop=function(a,b){if(c.call(this,a,b),e){if(b)for(var g,d=e.getTweensOf(this),f=d.length;--f>-1;)g=d[f].totalTime()/d[f].totalDuration(),g>0&&1>g&&d[f].seek(d[f].totalDuration());e.killTweensOf(this)}return this},a.gsap={enabled:function(a){d=a},version:"0.1.1"}})(jQuery);
\ No newline at end of file
diff --git a/src/uncompressed/jquery.gsap.js b/src/uncompressed/jquery.gsap.js
index 7c93bbb..a650d56 100644
--- a/src/uncompressed/jquery.gsap.js
+++ b/src/uncompressed/jquery.gsap.js
@@ -1,6 +1,6 @@
/*!
- * VERSION: 0.1.0
- * DATE: 2013-01-24
+ * VERSION: 0.1.1
+ * DATE: 2013-01-25
* JavaScript
* UPDATES AND DOCS AT: http://www.greensock.com/jquery-gsap-plugin/
*
@@ -21,12 +21,14 @@
_enabled = true,
TweenLite, CSSPlugin, _warned,
_dequeue = function(func, next) {
- if (func) {
+ if (typeof(func) === "function") {
this.each(func);
}
next();
},
_addCallback = function(type, func, obj, vars, next) {
+ next = (typeof(next) === "function") ? next : null;
+ func = (typeof(func) === "function") ? func : null;
if (!func && !next) {
return;
}
@@ -87,7 +89,7 @@
return _animate.call(this, prop, speed, easing, callback);
}
var config = $.speed(speed, easing, callback),
- vars = {ease:(_easeMap[config.easing] || _easeMap.swing)},
+ vars = {ease:(_easeMap[config.easing] || ((config.easing === false) ? _easeMap.linear : _easeMap.swing))},
obj = this,
specEasing = (typeof(speed) === "object") ? speed.specialEasing : null,
fallbackProps, val, p, doAnimation, specEasingVars;
@@ -170,6 +172,6 @@
return this;
};
- $.gsap = {enabled:function(value) {_enabled = value;}, version:"0.1.0"};
+ $.gsap = {enabled:function(value) {_enabled = value;}, version:"0.1.1"};
}(jQuery));
\ No newline at end of file