You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
18 KiB
JavaScript
2 lines
18 KiB
JavaScript
5 years ago
|
/* skel-layers.js v2.0.0 | (c) n33 | getskel.com | MIT licensed */
|
||
|
(function(e){typeof define=="function"&&define.amd?define(["jquery","skel"],e):e(jQuery,skel)})(function(e,t){var n="config",r="cache",i="_skel_layers_translateOrigin",s="setTimeout",o="_skel_layers_resetForms",u="trigger",f="_skel_layers_translate",l="visibleWrapper",c="_skel_layers_promote",h="position",p="_skel_layers_demote",d="$element",v="moveToVisibleWrapper",m="moveToHiddenWrapper",g="_skel_layers_resume",y="exclusiveLayer",b="exclusive",w="_skel_layers_cssNumericValue",E="center",S="css",x="right",T="bottom",N="prototype",C=null,k="_skel_layers_init",L="width",A="_skel_layers_suspend",O="left",M="_skel_layers_doTranslate",_="overflow-x",D="layers",P="speed",H="wrapper",B="hidestart",j="showstart",F="skel-layers-layer-z-index",I="transform",q="children",R="skel-layers-moved",U="hiddenWrapper",z="scrollTop",W="parent",X="length",V="hideend",$="showend",J="auto",K=!1,Q=".skel-layers-fixed:not(.skel-layers-moved)",G="deviceType",Y="unlockView",Z="height",et="resetForms",tt="top",nt="touchstart.lock click.lock scroll.lock",rt="_height",it="element",st="hidden",ot='<div id="skel-layers-placeholder-',ut="iterate",at="_skel_layers_fadeOut",ft="transition",lt=!0,ct="_skel_layers_fadeIn",ht="-webkit-",pt="recalcW",dt="skel-layers-exclusiveVisible",vt="padding-bottom",mt="blur",gt="useActive",yt="-webkit-tap-highlight-color",bt="easing",wt="events",Et="isInitialized",St="animation",xt="lockView",Tt="originalEvent",Nt="100%",Ct="skel-layers-layer-position",kt="z-index",Lt="skel-layers-layer-index",At="animate",Ot="#skel-layers-placeholder-",Mt="animations",_t="skel_layers_hiddenWrapper",Dt="append",Pt="_skel_layers_initializeCell",Ht="_width",Bt="find",jt="registerLocation",Ft="resize.lock scroll.lock",It="orientationchange.lock",qt="none",Rt="undefined",Ut="positions",zt="stopPropagation",Wt="touchPosX",Xt="breakpoints",Vt="touchPosY",$t="hide",Jt="_skel_layers_expandCell",Kt="-moz-",Qt="canUseProperty",Gt="attr",Yt="preventDefault",Zt="_skel_layers_hasParent",en="window",tn="addClass",nn="-ms-",rn="visible",sn="absolute",on="opacity",un="_skel_layers_xcss",an="-o-",fn="rgba(0,0,0,0)",ln="removeClass",cn="show",hn="object",pn="ios",dn="s ",vn="appendTo",mn="getArray",gn="cell-size",yn="states",bn="x",wn="overflow-y",En="mode",Sn="max-height",xn="px",Tn="-",Nn="fixed",Cn="isVisible",kn="max-width",Ln="recalcH",An="touches",On="side",Mn="*",_n="opacity ",Dn="relative",Pn="body",Hn="htmlbody",Bn="#",jn="html";t.registerPlugin(D,function(e){function Zn(e,t,r){var i,s,o=this;this.id=e,this.index=r,this[wt]={},this[n]={breakpoints:C,states:C,position:C,side:C,animation:qt,orientation:qt,width:J,height:J,maxWidth:Nt,maxHeight:Nt,zIndex:this.index,html:"",hidden:K,exclusive:C,resetScroll:lt,resetForms:lt,swipeToHide:lt,clickToHide:K},Yn._.extend(this[n],t),this[n][b]===C&&(this[n][b]=this[n][st]),this[it]=Yn._.newDiv(this[n][jn]),this[it].id=e,this[it]._layer=this,this[d]=C,this[Wt]=C,this[Vt]=C,this[rn]=K,s=Yn._.newElement(this.id,this[it],_t,1),s.onAttach=function(){var e=this[hn]._layer;e[Et]()||e.init(),e.resume()},s.onDetach=function(){var e=this[hn]._layer;e.suspend()},o[n][yn]&&o[n][yn]!=Yn._.sd?(Yn._.cacheElement(s),i=Yn._[mn](o[n][yn]),Yn._[ut](i,function(e){Yn._.addCachedElementToState(i[e],s)})):o[n][Xt]?(Yn._.cacheElement(s),i=Yn._[mn](o[n][Xt]),Yn._[ut](i,function(e){Yn._.addCachedElementToBreakpoint(i[e],s)})):Yn._.attachElement(s)}var Yn;return typeof e==Rt?K:(e.fn[p]=function(){var t,n;if(this[X]>1){for(t=0;t<this[X];t++)e(this[t])[p]();return e(this)}return n=e(this),n[S](kt,n.data(F)).data(F,""),n},e.fn[Jt]=function(){var t=e(this),n=t[W](),r=12;n[q]().each(function(){var t=e(this),n=t[Gt]("class");n&&n.match(/(\s+|^)([0-9]+)u(\s+|$)/)&&(r-=parseInt(RegExp.$2))}),r>0&&(t[Pt](),t[S](L,(t.data(gn)+r)/12*100+"%"))},e.fn[Zt]=function(){return e(this).parents()[X]>0},e.fn[Pt]=function(){var t=e(this);t[Gt]("class").match(/(\s+|^)([0-9]+)u(\s+|$)/)&&t.data(gn,parseInt(RegExp.$2))},e.fn[c]=function(t){var r,i,s;if(this[X]>1){for(r=0;r<this[X];r++)e(this[r])[c](t);return e(this)}return i=e(this),isNaN(s=parseInt(i.data(
|