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.

0 lines
10 KiB

  1. !function(a,b,c,d){"use strict";a.fn.transition=function(){{var e,f=a(this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments,k=j[0],l=[].slice.call(arguments,1),m="string"==typeof k;b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)}}return f.each(function(){var b,n,o,p,q,r,s,t,u,v,w,x=a(this),y=this;w={initialize:function(){u="module-"+t,b=w.get.settings.apply(y,j),p=b.className,q=b.metadata,r=w.get.animationEvent(),s=w.get.animationName(),o=b.error,t=b.namespace,v="."+b.namespace,n=x.data(u)||w,m&&(m=w.invoke(k)),m===!1&&(w.verbose("Converted arguments into settings object",b),w.animate(),w.instantiate())},instantiate:function(){w.verbose("Storing instance of module",w),x.data(u,n)},destroy:function(){w.verbose("Destroying previous module for",y),x.removeData(u)},refresh:function(){w.verbose("Refreshing display type on next animation"),delete w.displayType},forceRepaint:function(){w.verbose("Forcing element repaint");var a=x.parent(),b=x.next();0===b.size()?x.detach().appendTo(a):x.detach().insertBefore(b)},repaint:function(){w.verbose("Repainting element");y.offsetWidth},animate:function(a){return b=a||b,w.is.supported()?(w.debug("Preparing animation",b.animation),w.is.animating()&&b.queue?(!b.allowRepeats&&w.has.direction()&&w.is.occuring()&&w.queuing!==!0?w.error(o.repeated):w.queue(b.animation),!1):void(w.can.animate?w.set.animating(b.animation):w.error(o.noAnimation,b.animation))):(w.error(o.support),!1)},reset:function(){w.debug("Resetting animation to beginning conditions"),x.off(r+v),w.restore.conditions(),w.hide(),w.remove.animating()},queue:function(a){w.debug("Queueing animation of",a),w.queuing=!0,x.one(r+v,function(){w.queuing=!1,w.repaint(),w.animate.apply(this,b)})},complete:function(){w.verbose("CSS animation complete",b.animation),w.is.looping()||(w.is.outward()?(w.verbose("Animation is outward, hiding element"),w.restore.conditions(),w.remove.display(),w.hide(),a.proxy(b.onHide,this)()):w.is.inward()?(w.verbose("Animation is outward, showing element"),w.restore.conditions(),w.set.display(),w.show(),a.proxy(b.onShow,this)()):w.restore.conditions(),w.remove.duration(),w.remove.animating()),a.proxy(b.complete,this)()},has:{direction:function(a){return a=a||b.animation,-1!==a.search(p.inward)||-1!==a.search(p.outward)?(w.debug("Direction already set in animation"),!0):!1}},set:{animating:function(a){a=a||b.animation,w.save.conditions(),w.can.transition()&&!w.has.direction()&&w.set.direction(),w.remove.hidden(),w.set.display(),x.addClass(p.animating).addClass(p.transition).addClass(a).one(r+v,w.complete),w.set.duration(b.duration),w.debug("Starting tween",a,x.attr("class"))},display:function(){var a=w.get.style(),b=w.get.displayType(),c=a+"display: "+b+" !important;";x.css("display")!==b&&(w.verbose("Setting inline visibility to",b),x.attr("style",c))},direction:function(){x.is(":visible")&&!w.is.hidden()?(w.debug("Automatically determining the direction of animation","Outward"),x.removeClass(p.inward).addClass(p.outward)):(w.debug("Automatically determining the direction of animation","Inward"),x.removeClass(p.outward).addClass(p.inward))},looping:function(){w.debug("Transition set to loop"),x.addClass(p.looping)},duration:function(a){a=a||b.duration,a="number"==typeof a?a+"ms":a,w.verbose("Setting animation duration",a),x.css({"-webkit-animation-duration":a,"-moz-animation-duration":a,"-ms-animation-duration":a,"-o-animation-duration":a,"animation-duration":a})},hidden:function(){w.is.hidden()||(x.addClass(p.transition).addClass(p.hidden),"none"!==x.css("display")&&(w.verbose("Overriding default display to hide element"),x.css("display","none")))},visible:function(){x.addClass(p.transition).addClass(p.visible)}},save:{displayType:function(a){w.displayType=a},transitionExists:function(b,c){a.fn.transition.exists[b]=c,w.verbose("Saving existence of transition",b,c)},conditions:function(){x.attr("class")||!1,x.attr("style")||"";w.cache={className:x.attr("class"),style:w.get.style()},w.verbose("Saving original at