这篇文章给大家聊聊关于html5公司网站源码分享,以及h5网页源码下载对应的知识点,希望对各位有所帮助,不要忘了收藏本站哦。
效果图
敬爱的领导,尊敬的来宾,大家早上好!
贞子曰:一日不看代码,三日不思茶饭!
今天给大家带来的是banner幻灯片切换插件-Sequence.js
若想要文件版源码,请看评论区
废话不多说,上源码
CSS源码:
@charset”UTF-8″;
body,
html,
.seq{
width:100%;
height:100%;
margin:0;
padding:0;
}
.seq{
position:relative;
overflow:hidden;
font-family:sans-serif;
color:white;
text-align:center;
background-color:2A93BC;
text-align:left;
}
.seq.seq-preload-circle{
fill:2A93BC;
}
.seq.seq-step2{
background-color:45367E;
}
.seq.seq-feature{
width:70%;
max-width:100%;
height:auto;
}
.seq.seq-valign{
/*Remove4pxgaptoallowconsistentvalign*/
font-size:0;
}
.seq.seq-valign:before{
/*Ghostelement*/
content:””;
height:100%;
}
.seq.seq-valign:before,
.seq.seq-valign>.seq-vcenter{
/*Verticallyaligntheghostanddesiredelements*/
display:inline-block;
vertical-align:middle;
}
.seq.seq-valign>.seq-vcenter{
/*Resetfont-sizeonvalignedelements*/
font-size:16px;
}
.seq.seq-title{
margin:0;
font-size:1em;
font-family:’Exo2′,sans-serif;
text-transform:uppercase;
opacity:0;
-webkit-transform:translateX(50px)translateZ(0);
-ms-transform:translateX(50px)translateZ(0);
transform:translateX(50px)translateZ(0);
-webkit-transition-duration:.5s;
transition-duration:.5s;
-webkit-transition-property:opacity,-webkit-transform;
transition-property:opacity,transform;
}
.seq.seq-feature{
-webkit-transform:translateZ(0)scale(0);
-ms-transform:translateZ(0)scale(0);
transform:translateZ(0)scale(0);
-webkit-transition-duration:.5s;
transition-duration:.5s;
-webkit-transition-property:-webkit-transform,opacity;
transition-property:transform,opacity;
}
.seq.seq-in.seq-title{
opacity:1;
-webkit-transform:translateX(0)translateZ(0);
-ms-transform:translateX(0)translateZ(0);
transform:translateX(0)translateZ(0);
}
.seq.seq-in.seq-feature{
-webkit-transform:translateZ(0)scale(1);
-ms-transform:translateZ(0)scale(1);
transform:translateZ(0)scale(1);
}
.seq.seq-out.seq-title{
opacity:0;
-webkit-transform:translateX(-50px)translateZ(0);
-ms-transform:translateX(-50px)translateZ(0);
transform:translateX(-50px)translateZ(0);
}
.seq.seq-out.seq-feature{
-webkit-transform:translateZ(0)scale(1);
-ms-transform:translateZ(0)scale(1);
transform:translateZ(0)scale(1);
opacity:0;
}
.seq.seq-nav{
display:none;
position:absolute;
z-index:100;
top:50%;
left:0;
right:0;
max-width:640px;
width:100%;
border:none;
margin:0auto;
padding:0;
}
.seq.seq-active{
/*ShownavigationwhenJSisenabled*/
}
.seq.seq-active.seq-nav{
display:block;
}
.seq.seq-next,
.seq.seq-prev{
position:absolute;
margin-top:-20px;
padding:0;
background:transparent;
border:none;
padding:.75em;
cursor:pointer;
color:white;
font-size:.75em;
text-transform:uppercase;
opacity:.7;
-webkit-transition-duration:.25s;
transition-duration:.25s;
-webkit-transition-property:opacity;
transition-property:opacity;
}
.seq.seq-next:hover,
.seq.seq-prev:hover{
opacity:1;
}
.seq.seq-next{
right:.625em;
}
.seq.seq-prev{
left:.625em;
}
.seq.seq-pagination{
display:none;
margin:01em;
padding:0;
}
.seq.seq-paginationli{
position:relative;
list-style:none;
display:inline-block;
vertical-align:middle;
width:40px;
height:40px;
margin:0.5em;
}
.seq.seq-paginationli:before{
content:””;
display:block;
position:absolute;
top:100%;
left:50%;
width:6px;
height:6px;
margin-top:.5em;
border-radius:50%;
background:white;
opacity:0;
-webkit-transition-duration:.25s;
transition-duration:.25s;
-webkit-transition-property:opacity;
transition-property:opacity;
}
.seq.seq-pagination.seq-current:before{
opacity:.7;
}
.seq.seq-paginationimg,
.seq.seq-paginationa{
display:block;
border:none;
}
@mediaonlyscreenand(min-width:460px){
.seq.seq-feature{
max-height:50vh;
width:auto;
max-width:100%;
height:auto;
}
}
@mediaonlyscreenand(min-width:320px)and(min-height:320px){
.seq.seq-canvas>*{
bottom:80px;
bottom:5rem;
}
.seq.seq-title{
font-size:1.4em;
}
.seq.seq-nav{
/*
*Positionthenavacrossthebottom
*/
top:auto;
bottom:2.5em;
}
.seq.seq-next,
.seq.seq-prev,
.seq.seq-pagination{
position:relative;
display:inline-block;
vertical-align:middle;
margin-top:0;
}
.seq.seq-pagination{
/*
*Showthepagination
*/
display:inline-block;
}
}
@mediaonlyscreenand(min-height:480px){
.seq.seq-feature{
/*
*Theimagecannowbecomeitsfullnativeheight
*/
max-height:100%;
}
}
scripts源码:
/*!Hammer.JS-v2.0.4-2014-09-28
*http://hammerjs.github.io/
*
*Copyright(c)2014JorikTangelder;
*LicensedundertheMITlicense*/
!function(a,b,c,d){“usestrict”;functione(a,b,c){returnsetTimeout(k(a,c),b)}functionf(a,b,c){returnArray.isArray(a)?(g(a,c[b],c),!0):!1}functiong(a,b,c){vare;if(a)if(a.forEach)a.forEach(b,c);elseif(a.length!==d)for(e=0;e<a.length;)b.call(c,a[e],e,a),e++;elsefor(eina)a.hasOwnProperty(e)&&b.call(c,a[e],e,a)}functionh(a,b,c){for(vare=Object.keys(b),f=0;f<e.length;)(!c||c&&a[e[f]]===d)&&(a[e[f]]=b[e[f]]),f++;returna}functioni(a,b){returnh(a,b,!0)}functionj(a,b,c){vard,e=b.prototype;d=a.prototype=Object.create(e),d.constructor=a,d._super=e,c&&h(d,c)}functionk(a,b){returnfunction(){returna.apply(b,arguments)}}functionl(a,b){returntypeofa==kb?a.apply(b?b[0]||d:d,b):a}functionm(a,b){returna===d?b:a}functionn(a,b,c){g(r(b),function(b){a.addEventListener(b,c,!1)})}functiono(a,b,c){g(r(b),function(b){a.removeEventListener(b,c,!1)})}functionp(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1}functionq(a,b){returna.indexOf(b)>-1}functionr(a){returna.trim().split(/\\s+/g)}functions(a,b,c){if(a.indexOf&&!c)returna.indexOf(b);for(vard=0;d<a.length;){if(c&&a[d][c]==b||!c&&a[d]===b)returnd;d++}return-1}functiont(a){returnArray.prototype.slice.call(a,0)}functionu(a,b,c){for(vard=[],e=[],f=0;f<a.length;){varg=b?a[f][b]:a[f];s(e,g)<0&&d.push(a[f]),e[f]=g,f++}returnc&&(d=b?d.sort(function(a,c){returna[b]>c[b]}):d.sort()),d}functionv(a,b){for(varc,e,f=b[0].toUpperCase()+b.slice(1),g=0;g<ib.length;){if(c=ib[g],e=c?c+f:b,eina)returne;g++}returnd}functionw(){returnob++}functionx(a){varb=a.ownerDocument;returnb.defaultView||b.parentWindow}functiony(a,b){varc=this;this.manager=a,this.callback=b,this.element=a.element,this.target=a.options.inputTarget,this.domHandler=function(b){l(a.options.enable,[a])&&c.handler(b)},this.init()}functionz(a){varb,c=a.options.inputClass;returnnew(b=c?c:rb?N:sb?Q:qb?S:M)(a,A)}functionA(a,b,c){vard=c.pointers.length,e=c.changedPointers.length,f=b&yb&&d-e===0,g=b&(Ab|Bb)&&d-e===0;c.isFirst=!!f,c.isFinal=!!g,f&&(a.session={}),c.eventType=b,B(a,c),a.emit(“hammer.input”,c),a.recognize(c),a.session.prevInput=c}functionB(a,b){varc=a.session,d=b.pointers,e=d.length;c.firstInput||(c.firstInput=E(b)),e>1&&!c.firstMultiple?c.firstMultiple=E(b):1===e&&(c.firstMultiple=!1);varf=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=F(d);b.timeStamp=nb(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=J(h,i),b.distance=I(h,i),C(c,b),b.offsetDirection=H(b.deltaX,b.deltaY),b.scale=g?L(g.pointers,d):1,b.rotation=g?K(g.pointers,d):0,D(c,b);varj=a.element;p(b.srcEvent.target,j)&&(j=b.srcEvent.target),b.target=j}functionC(a,b){varc=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};(b.eventType===yb||f.eventType===Ab)&&(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}functionD(a,b){varc,e,f,g,h=a.lastInterval||b,i=b.timeStamp-h.timeStamp;if(b.eventType!=Bb&&(i>xb||h.velocity===d)){varj=h.deltaX-b.deltaX,k=h.deltaY-b.deltaY,l=G(i,j,k);e=l.x,f=l.y,c=mb(l.x)>mb(l.y)?l.x:l.y,g=H(j,k),a.lastInterval=b}elsec=h.velocity,e=h.velocityX,f=h.velocityY,g=h.direction;b.velocity=c,b.velocityX=e,b.velocityY=f,b.direction=g}functionE(a){for(varb=[],c=0;c<a.pointers.length;)b[c]={clientX:lb(a.pointers[c].clientX),clientY:lb(a.pointers[c].clientY)},c++;return{timeStamp:nb(),pointers:b,center:F(b),deltaX:a.deltaX,deltaY:a.deltaY}}functionF(a){varb=a.length;if(1===b)return{x:lb(a[0].clientX),y:lb(a[0].clientY)};for(varc=0,d=0,e=0;b>e;)c+=a[e].clientX,d+=a[e].clientY,e++;return{x:lb(c/b),y:lb(d/b)}}functionG(a,b,c){return{x:b/a||0,y:c/a||0}}functionH(a,b){returna===b?Cb:mb(a)>=mb(b)?a>0?Db:Eb:b>0?Fb:Gb}functionI(a,b,c){c||(c=Kb);vard=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];returnMath.sqrt(d*d+e*e)}functionJ(a,b,c){c||(c=Kb);vard=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return180*Math.atan2(e,d)/Math.PI}functionK(a,b){returnJ(b[1],b[0],Lb)-J(a[1],a[0],Lb)}functionL(a,b){returnI(b[0],b[1],Lb)/I(a[0],a[1],Lb)}functionM(){this.evEl=Nb,this.evWin=Ob,this.allow=!0,this.pressed=!1,y.apply(this,arguments)}functionN(){this.evEl=Rb,this.evWin=Sb,y.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}functionO(){this.evTarget=Ub,this.evWin=Vb,this.started=!1,y.apply(this,arguments)}functionP(a,b){varc=t(a.touches),d=t(a.changedTouches);returnb&(Ab|Bb)&&(c=u(c.concat(d),”identifier”,!0)),[c,d]}functionQ(){this.evTarget=Xb,this.targetIds={},y.apply(this,arguments)}functionR(a,b){varc=t(a.touches),d=this.targetIds;if(b&(yb|zb)&&1===c.length)returnd[c[0].identifier]=!0,[c,c];vare,f,g=t(a.changedTouches),h=[],i=this.target;if(f=c.filter(function(a){returnp(a.target,i)}),b===yb)for(e=0;e<f.length;)d[f[e].identifier]=!0,e++;for(e=0;e<g.length;)d[g[e].identifier]&&h.push(g[e]),b&(Ab|Bb)&&deleted[g[e].identifier],e++;returnh.length?[u(f.concat(h),”identifier”,!0),h]:void0}functionS(){y.apply(this,arguments);vara=k(this.handler,this);this.touch=newQ(this.manager,a),this.mouse=newM(this.manager,a)}functionT(a,b){this.manager=a,this.set(b)}functionU(a){if(q(a,bc))returnbc;varb=q(a,cc),c=q(a,dc);returnb&&c?cc+””+dc:b||c?b?cc:dc:q(a,ac)?ac:_b}functionV(a){this.id=w(),this.manager=null,this.options=i(a||{},this.defaults),this.options.enable=m(this.options.enable,!0),this.state=ec,this.simultaneous={},this.requireFail=[]}functionW(a){returna&jc?”cancel”:a&hc?”end”:a&gc?”move”:a&fc?”start”:””}functionX(a){returna==Gb?”down”:a==Fb?”up”:a==Db?”left”:a==Eb?”right”:””}functionY(a,b){varc=b.manager;returnc?c.get(a):a}functionZ(){V.apply(this,arguments)}function$(){Z.apply(this,arguments),this.pX=null,this.pY=null}function_(){Z.apply(this,arguments)}functionab(){V.apply(this,arguments),this._timer=null,this._input=null}functionbb(){Z.apply(this,arguments)}functioncb(){Z.apply(this,arguments)}functiondb(){V.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}functioneb(a,b){returnb=b||{},b.recognizers=m(b.recognizers,eb.defaults.preset),newfb(a,b)}functionfb(a,b){b=b||{},this.options=i(b,eb.defaults),this.options.inputTarget=this.options.inputTarget||a,this.handlers={},this.session={},this.recognizers=[],this.element=a,this.input=z(this),this.touchAction=newT(this,this.options.touchAction),gb(this,!0),g(b.recognizers,function(a){varb=this.add(newa[0](a[1]));a[2]&&b.recognizeWith(a[2]),a[3]&&b.requireFailure(a[3])},this)}functiongb(a,b){varc=a.element;g(a.options.cssProps,function(a,d){c.style[v(c.style,d)]=b?a:””})}functionhb(a,c){vard=b.createEvent(“Event”);d.initEvent(a,!0,!0),d.gesture=c,c.target.dispatchEvent(d)}varib=[“”,”webkit”,”moz”,”MS”,”ms”,”o”],jb=b.createElement(“div”),kb=”function”,lb=Math.round,mb=Math.abs,nb=Date.now,ob=1,pb=/mobile|tablet|ip(ad|hone|od)|android/i,qb=”ontouchstart”ina,rb=v(a,”PointerEvent”)!==d,sb=qb&&pb.test(navigator.userAgent),tb=”touch”,ub=”pen”,vb=”mouse”,wb=”kinect”,xb=25,yb=1,zb=2,Ab=4,Bb=8,Cb=1,Db=2,Eb=4,Fb=8,Gb=16,Hb=Db|Eb,Ib=Fb|Gb,Jb=Hb|Ib,Kb=[“x”,”y”],Lb=[“clientX”,”clientY”];y.prototype={handler:function(){},init:function(){this.evEl&&n(this.element,this.evEl,this.domHandler),this.evTarget&&n(this.target,this.evTarget,this.domHandler),this.evWin&&n(x(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&o(this.element,this.evEl,this.domHandler),this.evTarget&&o(this.target,this.evTarget,this.domHandler),this.evWin&&o(x(this.element),this.evWin,this.domHandler)}};varMb={mousedown:yb,mousemove:zb,mouseup:Ab},Nb=”mousedown”,Ob=”mousemovemouseup”;j(M,y,{handler:function(a){varb=Mb[a.type];b&yb&&0===a.button&&(this.pressed=!0),b&zb&&1!==a.which&&(b=Ab),this.pressed&&this.allow&&(b&Ab&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[a],changedPointers:[a],pointerType:vb,srcEvent:a}))}});varPb={pointerdown:yb,pointermove:zb,pointerup:Ab,pointercancel:Bb,pointerout:Bb},Qb={2:tb,3:ub,4:vb,5:wb},Rb=”pointerdown”,Sb=”pointermovepointeruppointercancel”;a.MSPointerEvent&&(Rb=”MSPointerDown”,Sb=”MSPointerMoveMSPointerUpMSPointerCancel”),j(N,y,{handler:function(a){varb=this.store,c=!1,d=a.type.toLowerCase().replace(“ms”,””),e=Pb[d],f=Qb[a.pointerType]||a.pointerType,g=f==tb,h=s(b,a.pointerId,”pointerId”);e&yb&&(0===a.button||g)?0>h&&(b.push(a),h=b.length-1):e&(Ab|Bb)&&(c=!0),0>h||(b[h]=a,this.callback(this.manager,e,{pointers:b,changedPointers:[a],pointerType:f,srcEvent:a}),c&&b.splice(h,1))}});varTb={touchstart:yb,touchmove:zb,touchend:Ab,touchcancel:Bb},Ub=”touchstart”,Vb=”touchstarttouchmovetouchendtouchcancel”;j(O,y,{handler:function(a){varb=Tb[a.type];if(b===yb&&(this.started=!0),this.started){varc=P.call(this,a,b);b&(Ab|Bb)&&c[0].length-c[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:tb,srcEvent:a})}}});varWb={touchstart:yb,touchmove:zb,touchend:Ab,touchcancel:Bb},Xb=”touchstarttouchmovetouchendtouchcancel”;j(Q,y,{handler:function(a){varb=Wb[a.type],c=R.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:tb,srcEvent:a})}}),j(S,y,{handler:function(a,b,c){vard=c.pointerType==tb,e=c.pointerType==vb;if(d)this.mouse.allow=!1;elseif(e&&!this.mouse.allow)return;b&(Ab|Bb)&&(this.mouse.allow=!0),this.callback(a,b,c)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});varYb=v(jb.style,”touchAction”),Zb=Yb!==d,$b=”compute”,_b=”auto”,ac=”manipulation”,bc=”none”,cc=”pan-x”,dc=”pan-y”;T.prototype={set:function(a){a==$b&&(a=this.compute()),Zb&&(this.manager.element.style[Yb]=a),this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){vara=[];returng(this.manager.recognizers,function(b){l(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))}),U(a.join(“”))},preventDefaults:function(a){if(!Zb){varb=a.srcEvent,c=a.offsetDirection;if(this.manager.session.prevented)returnvoidb.preventDefault();vard=this.actions,e=q(d,bc),f=q(d,dc),g=q(d,cc);returne||f&&c&Hb||g&&c&Ib?this.preventSrc(b):void0}},preventSrc:function(a){this.manager.session.prevented=!0,a.preventDefault()}};varec=1,fc=2,gc=4,hc=8,ic=hc,jc=16,kc=32;V.prototype={defaults:{},set:function(a){returnh(this.options,a),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(a){if(f(a,”recognizeWith”,this))returnthis;varb=this.simultaneous;returna=Y(a,this),b[a.id]||(b[a.id]=a,a.recognizeWith(this)),this},dropRecognizeWith:function(a){returnf(a,”dropRecognizeWith”,this)?this:(a=Y(a,this),deletethis.simultaneous[a.id],this)},requireFailure:function(a){if(f(a,”requireFailure”,this))returnthis;varb=this.requireFail;returna=Y(a,this),-1===s(b,a)&&(b.push(a),a.requireFailure(this)),this},dropRequireFailure:function(a){if(f(a,”dropRequireFailure”,this))returnthis;a=Y(a,this);varb=s(this.requireFail,a);returnb>-1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){returnthis.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){functionb(b){c.manager.emit(c.options.event+(b?W(d):””),a)}varc=this,d=this.state;hc>d&&b(!0),b(),d>=hc&&b(!0)},tryEmit:function(a){returnthis.canEmit()?this.emit(a):void(this.state=kc)},canEmit:function(){for(vara=0;a<this.requireFail.length;){if(!(this.requireFail[a].state&(kc|ec)))return!1;a++}return!0},recognize:function(a){varb=h({},a);returnl(this.options.enable,[this,b])?(this.state&(ic|jc|kc)&&(this.state=ec),this.state=this.process(b),void(this.state&(fc|gc|hc|jc)&&this.tryEmit(b))):(this.reset(),void(this.state=kc))},process:function(){},getTouchAction:function(){},reset:function(){}},j(Z,V,{defaults:{pointers:1},attrTest:function(a){varb=this.options.pointers;return0===b||a.pointers.length===b},process:function(a){varb=this.state,c=a.eventType,d=b&(fc|gc),e=this.attrTest(a);returnd&&(c&Bb||!e)?b|jc:d||e?c&Ab?b|hc:b&fc?b|gc:fc:kc}}),j($,Z,{defaults:{event:”pan”,threshold:10,pointers:1,direction:Jb},getTouchAction:function(){vara=this.options.direction,b=[];returna&Hb&&b.push(dc),a&Ib&&b.push(cc),b},directionTest:function(a){varb=this.options,c=!0,d=a.distance,e=a.direction,f=a.deltaX,g=a.deltaY;returne&b.direction||(b.direction&Hb?(e=0===f?Cb:0>f?Db:Eb,c=f!=this.pX,d=Math.abs(a.deltaX)):(e=0===g?Cb:0>g?Fb:Gb,c=g!=this.pY,d=Math.abs(a.deltaY))),a.direction=e,c&&d>b.threshold&&e&b.direction},attrTest:function(a){returnZ.prototype.attrTest.call(this,a)&&(this.state&fc||!(this.state&fc)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;varb=X(a.direction);b&&this.manager.emit(this.options.event+b,a),this._super.emit.call(this,a)}}),j(_,Z,{defaults:{event:”pinch”,threshold:0,pointers:2},getTouchAction:function(){return[bc]},attrTest:function(a){returnthis._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&fc)},emit:function(a){if(this._super.emit.call(this,a),1!==a.scale){varb=a.scale<1?”in”:”out”;this.manager.emit(this.options.event+b,a)}}}),j(ab,V,{defaults:{event:”press”,pointers:1,time:500,threshold:5},getTouchAction:function(){return[_b]},process:function(a){varb=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,f=a.deltaTime>b.time;if(this._input=a,!d||!c||a.eventType&(Ab|Bb)&&!f)this.reset();elseif(a.eventType&yb)this.reset(),this._timer=e(function(){this.state=ic,this.tryEmit()},b.time,this);elseif(a.eventType&Ab)returnic;returnkc},reset:function(){clearTimeout(this._timer)},emit:function(a){this.state===ic&&(a&&a.eventType&Ab?this.manager.emit(this.options.event+”up”,a):(this._input.timeStamp=nb(),this.manager.emit(this.options.event,this._input)))}}),j(bb,Z,{defaults:{event:”rotate”,threshold:0,pointers:2},getTouchAction:function(){return[bc]},attrTest:function(a){returnthis._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&fc)}}),j(cb,Z,{defaults:{event:”swipe”,threshold:10,velocity:.65,direction:Hb|Ib,pointers:1},getTouchAction:function(){return$.prototype.getTouchAction.call(this)},attrTest:function(a){varb,c=this.options.direction;returnc&(Hb|Ib)?b=a.velocity:c&Hb?b=a.velocityX:c&Ib&&(b=a.velocityY),this._super.attrTest.call(this,a)&&c&a.direction&&a.distance>this.options.threshold&&mb(b)>this.options.velocity&&a.eventType&Ab},emit:function(a){varb=X(a.direction);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),j(db,V,{defaults:{event:”tap”,pointers:1,taps:1,interval:300,time:250,threshold:2,posThreshold:10},getTouchAction:function(){return[ac]},process:function(a){varb=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,f=a.deltaTime<b.time;if(this.reset(),a.eventType&yb&&0===this.count)returnthis.failTimeout();if(d&&f&&c){if(a.eventType!=Ab)returnthis.failTimeout();varg=this.pTime?a.timeStamp-this.pTime<b.interval:!0,h=!this.pCenter||I(this.pCenter,a.center)<b.posThreshold;this.pTime=a.timeStamp,this.pCenter=a.center,h&&g?this.count+=1:this.count=1,this._input=a;vari=this.count%b.taps;if(0===i)returnthis.hasRequireFailures()?(this._timer=e(function(){this.state=ic,this.tryEmit()},b.interval,this),fc):ic}returnkc},failTimeout:function(){returnthis._timer=e(function(){this.state=kc},this.options.interval,this),kc},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ic&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),eb.VERSION=”2.0.4″,eb.defaults={domEvents:!1,touchAction:$b,enable:!0,inputTarget:null,inputClass:null,preset:[[bb,{enable:!1}],[_,{enable:!1},[“rotate”]],[cb,{direction:Hb}],[$,{direction:Hb},[“swipe”]],[db],[db,{event:”doubletap”,taps:2},[“tap”]],[ab]],cssProps:{userSelect:”none”,touchSelect:”none”,touchCallout:”none”,contentZooming:”none”,userDrag:”none”,tapHighlightColor:”rgba(0,0,0,0)”}};varlc=1,mc=2;fb.prototype={set:function(a){returnh(this.options,a),a.touchAction&&this.touchAction.update(),a.inputTarget&&(this.input.destroy(),this.input.target=a.inputTarget,this.input.init()),this},stop:function(a){this.session.stopped=a?mc:lc},recognize:function(a){varb=this.session;if(!b.stopped){this.touchAction.preventDefaults(a);varc,d=this.recognizers,e=b.curRecognizer;(!e||e&&e.state&ic)&&(e=b.curRecognizer=null);for(varf=0;f<d.length;)c=d[f],b.stopped===mc||e&&c!=e&&!c.canRecognizeWith(e)?c.reset():c.recognize(a),!e&&c.state&(fc|gc|hc)&&(e=b.curRecognizer=c),f++}},get:function(a){if(ainstanceofV)returna;for(varb=this.recognizers,c=0;c<b.length;c++)if(b[c].options.event==a)returnb[c];returnnull},add:function(a){if(f(a,”add”,this))returnthis;varb=this.get(a.options.event);returnb&&this.remove(b),this.recognizers.push(a),a.manager=this,this.touchAction.update(),a},remove:function(a){if(f(a,”remove”,this))returnthis;varb=this.recognizers;returna=this.get(a),b.splice(s(b,a),1),this.touchAction.update(),this},on:function(a,b){varc=this.handlers;returng(r(a),function(a){c[a]=c[a]||[],c[a].push(b)}),this},off:function(a,b){varc=this.handlers;returng(r(a),function(a){b?c[a].splice(s(c[a],b),1):deletec[a]}),this},emit:function(a,b){this.options.domEvents&&hb(a,b);varc=this.handlers[a]&&this.handlers[a].slice();if(c&&c.length){b.type=a,b.preventDefault=function(){b.srcEvent.preventDefault()};for(vard=0;d<c.length;)c[d](b),d++}},destroy:function(){this.element&&gb(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},h(eb,{INPUT_START:yb,INPUT_MOVE:zb,INPUT_END:Ab,INPUT_CANCEL:Bb,STATE_POSSIBLE:ec,STATE_BEGAN:fc,STATE_CHANGED:gc,STATE_ENDED:hc,STATE_RECOGNIZED:ic,STATE_CANCELLED:jc,STATE_FAILED:kc,DIRECTION_NONE:Cb,DIRECTION_LEFT:Db,DIRECTION_RIGHT:Eb,DIRECTION_UP:Fb,DIRECTION_DOWN:Gb,DIRECTION_HORIZONTAL:Hb,DIRECTION_VERTICAL:Ib,DIRECTION_ALL:Jb,Manager:fb,Input:y,TouchAction:T,TouchInput:Q,MouseInput:M,PointerEventInput:N,TouchMouseInput:S,SingleTouchInput:O,Recognizer:V,AttrRecognizer:Z,Tap:db,Pan:$,Swipe:cb,Pinch:_,Rotate:bb,Press:ab,on:n,off:o,each:g,merge:i,extend:h,inherit:j,bindFn:k,prefixed:v}),typeofdefine==kb&&define.amd?define(function(){returneb}):”undefined”!=typeofmodule&&module.exports?module.exports=eb:a[c]=eb}(window,document,”Hammer”);
//#sourceMappingURL=hammer.min.map
好了,本文到此结束,如果可以帮助到大家,还望关注本站哦!