You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
3.4 KiB

!function(a,b,c,d){a.fn.transition=function(b){var e,f=a(this),g=a.extend(!0,{},a.fn.transition.settings,b),h="."+g.namespace,i="module-"+g.namespace,j=f.selector||"",k=(new Date).getTime(),l=[],m=arguments[0],n="string"==typeof m,o=[].slice.call(arguments,1);return f.each(function(){var b,f=a(this),p=this,q=f.data(i),r=g.error;b={initialize:function(){q=b,f.data(i,q)},destroy:function(){b.verbose("Destroying previous module for",p),f.removeData(i).off(h)},repaint:function(a){b.verbose("Forcing repaint event"),a=p.offsetWidth},get:{settings:function(b,c,e,f){return a.isObject(b)===d?b:g="object"==typeof c?a.extend({},g,c):"function"==typeof e?a.extend({},g,{duration:c,complete:e}):"object"==typeof e?a.extend(!0,{},g,{duration:c},e):a.extend({},g,{duration:c,easing:e,complete:f})},transitionEvent:function(){var a,b=c.createElement("element"),e={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(a in e)if(b.style[a]!==d)return e[a];return!1}},can:{transition:function(b){var c=a("<div />");return c.addClass(b),"0s"!==c.css("transitionDuration")}},is:{animating:function(){return b.animating}},animate:function(c){return b.verbose("Converting arguments into settings object",arguments),c=b.get.settings(arguments),b.animating=!0,b.can.transition()?(b.debug("Beginning animation"),a(this).one(b.get.transitionEvent(),function(){b.reset(c.transition)}),void 0):(b.error(r.noAnimation),!1)},reset:function(b){a(this).removeClass(b)},setting:function(b,c){return c===d?g[b]:(a.isPlainObject(b)?a.extend(!0,g,b):g[b]=c,void 0)},internal:function(c,e){return e===d?b[c]:(a.isPlainObject(c)?a.extend(!0,b,c):b[c]=e,void 0)},debug:function(){g.debug&&(g.performance?b.performance.log(arguments):b.debug=Function.prototype.bind.call(console.info,console,g.moduleName+":"))},verbose:function(){g.verbose&&g.debug&&(g.performance?b.performance.log(arguments):b.verbose=Function.prototype.bind.call(console.info,console,g.moduleName+":"))},error:function(){b.error=Function.prototype.bind.call(console.error,console,g.moduleName+":")},performance:{log:function(a){var c,d,e;g.performance&&(c=(new Date).getTime(),e=k||c,d=c-e,k=c,l.push({Element:p,Name:a[0],Arguments:[].slice.call(a,1)||"","Execution Time":d})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,100)},display:function(){var b=g.moduleName+":",c=0;k=!1,a.each(l,function(a,b){c+=b["Execution Time"]}),b+=" "+c+"ms",j&&(b+=" '"+j+"'"),(console.group!==d||console.table!==d)&&l.length>0&&(console.groupCollapsed(b),console.table?console.table(l):a.each(l,function(a,b){console.log(b.Name+": "+b["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(c,e,f){var g,h,i=q;return e=e||o,f=p||f,"string"==typeof c&&i!==d&&(c=c.split(/[\. ]/),g=c.length-1,a.each(c,function(c,e){return a.isPlainObject(i[e])&&c!=g?(i=i[e],!0):i[e]!==d?(h=i[e],!0):(b.error(error.method),!1)})),a.isFunction(h)?(q.verbose("Executing invoked function",h),h.apply(f,e)):h||!1}},n?(q===d&&b.initialize(),e=b.invoke(m)):(q!==d&&b.destroy(),b.initialize())}),e?e:this},a.fn.transition.settings={moduleName:"Shape Module",debug:!1,verbose:!1,performance:!1,namespace:"transition",beforeChange:function(){},onChange:function(){},useCSS:!0,duration:1e3,easing:"easeInOutQuad",error:{noAnimation:"There is no css animation matching the one you specified.",method:"The method you called is not defined"},selector:{sides:".sides",side:".side"}}}(jQuery,window,document);