代码拉取完成,页面将自动刷新
/*!
* VERSION: 0.13.0
* DATE: 2015-03-13
* UPDATES AND DOCS AT: http://greensock.com
*
* Requires TweenLite and CSSPlugin version 1.16.0 or later (TweenMax contains both TweenLite and CSSPlugin). ThrowPropsPlugin is required for momentum-based continuation of movement after the mouse/touch is released (ThrowPropsPlugin is a membership benefit of Club GreenSock - http://greensock.com/club/).
*
* @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
* This work is subject to the terms at http://greensock.com/standard-license or for
* Club GreenSock members, the software agreement that was issued with your membership.
*
* @author: Jack Doyle, jack@greensock.com
*/
var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("utils.Draggable",["events.EventDispatcher","TweenLite"],function(t,e){var i,s,r,n,a,o={css:{}},l={css:{}},h={css:{}},u={css:{}},_=_gsScope._gsDefine.globals,c={},f=document,p=f.documentElement||{},d=[],m=function(){return!1},g=180/Math.PI,v=999999999999999,y=Date.now||function(){return(new Date).getTime()},T=!(f.addEventListener||!f.all),w=f.createElement("div"),x=[],b={},P=0,S=/^(?:a|input|textarea|button|select)$/i,C=0,k=-1!==navigator.userAgent.toLowerCase().indexOf("android"),R=0,A={},O=function(t){if("string"==typeof t&&(t=e.selector(t)),!t||t.nodeType)return[t];var i,s=[],r=t.length;for(i=0;i!==r;s.push(t[i++]));return s},D=function(){for(var t=x.length;--t>-1;)x[t]()},M=function(t){x.push(t),1===x.length&&e.ticker.addEventListener("tick",D,this,!1,1)},L=function(t){for(var i=x.length;--i>-1;)x[i]===t&&x.splice(i,1);e.to(N,0,{overwrite:"all",delay:15,onComplete:N})},N=function(){x.length||e.ticker.removeEventListener("tick",D)},E=function(t,e){var i;for(i in e)void 0===t[i]&&(t[i]=e[i]);return t},I=function(){return null!=window.pageYOffset?window.pageYOffset:null!=f.scrollTop?f.scrollTop:p.scrollTop||f.body.scrollTop||0},z=function(){return null!=window.pageXOffset?window.pageXOffset:null!=f.scrollLeft?f.scrollLeft:p.scrollLeft||f.body.scrollLeft||0},X=function(t,e){be(t,"scroll",e),B(t.parentNode)||X(t.parentNode,e)},F=function(t,e){Pe(t,"scroll",e),B(t.parentNode)||F(t.parentNode,e)},B=function(t){return!(t&&t!==p&&t!==f&&t!==f.body&&t!==window&&t.nodeType&&t.parentNode)},Y=function(t,e){var i="x"===e?"Width":"Height",s="scroll"+i,r="client"+i,n=f.body;return Math.max(0,B(t)?Math.max(p[s],n[s])-(window["inner"+i]||p[r]||n[r]):t[s]-t[r])},U=function(t){var e=B(t),i=Y(t,"x"),s=Y(t,"y");e?t=A:U(t.parentNode),t._gsMaxScrollX=i,t._gsMaxScrollY=s,t._gsScrollX=t.scrollLeft||0,t._gsScrollY=t.scrollTop||0},j=function(t,e){return t=t||window.event,c.pageX=t.clientX+f.body.scrollLeft+p.scrollLeft,c.pageY=t.clientY+f.body.scrollTop+p.scrollTop,e&&(t.returnValue=!1),c},W=function(t){return t?("string"==typeof t&&(t=e.selector(t)),t.length&&t!==window&&t[0]&&t[0].style&&!t.nodeType&&(t=t[0]),t===window||t.nodeType&&t.style?t:null):t},q=function(t,e){var s,r,n,a=t.style;if(void 0===a[e]){for(n=["O","Moz","ms","Ms","Webkit"],r=5,s=e.charAt(0).toUpperCase()+e.substr(1);--r>-1&&void 0===a[n[r]+s];);if(0>r)return"";i=3===r?"ms":n[r],e=i+s}return e},V=function(t,e,i){var s=t.style;s&&(void 0===s[e]&&(e=q(t,e)),null==i?s.removeProperty?s.removeProperty(e.replace(/([A-Z])/g,"-$1").toLowerCase()):s.removeAttribute(e):void 0!==s[e]&&(s[e]=i))},G=f.defaultView?f.defaultView.getComputedStyle:m,H=/(?:Left|Right|Width)/i,Q=/(?:\d|\-|\+|=|#|\.)*/g,Z=function(t,e,i,s,r){if("px"===s||!s)return i;if("auto"===s||!i)return 0;var n,a=H.test(e),o=t,l=ee.style,h=0>i;return h&&(i=-i),"%"===s&&-1!==e.indexOf("border")?n=i/100*(a?t.clientWidth:t.clientHeight):(l.cssText="border:0 solid red;position:"+K(t,"position",!0)+";line-height:0;","%"!==s&&o.appendChild?l[a?"borderLeftWidth":"borderTopWidth"]=i+s:(o=t.parentNode||f.body,l[a?"width":"height"]=i+s),o.appendChild(ee),n=parseFloat(ee[a?"offsetWidth":"offsetHeight"]),o.removeChild(ee),0!==n||r||(n=Z(t,e,i,s,!0))),h?-n:n},$=function(t,e){if("absolute"!==K(t,"position",!0))return 0;var i="left"===e?"Left":"Top",s=K(t,"margin"+i,!0);return t["offset"+i]-(Z(t,e,parseFloat(s),(s+"").replace(Q,""))||0)},K=function(t,e,i){var s,r=(t._gsTransform||{})[e];return r||0===r?r:(t.style[e]?r=t.style[e]:(s=G(t))?(r=s.getPropertyValue(e.replace(/([A-Z])/g,"-$1").toLowerCase()),r=r||s.length?r:s[e]):t.currentStyle&&(r=t.currentStyle[e]),"auto"!==r||"top"!==e&&"left"!==e||(r=$(t,e)),i?r:parseFloat(r)||0)},J=function(t,e,i){var s=t.vars,r=s[i],n=t._listeners[e];"function"==typeof r&&r.apply(s[i+"Scope"]||t,s[i+"Params"]||[t.pointerEvent]),n&&t.dispatchEvent(e)},te=function(t,e){var i,s,r,n=W(t);return n?ve(n,e):void 0!==t.left?(r=fe(e),{left:t.left-r.x,top:t.top-r.y,width:t.width,height:t.height}):(s=t.min||t.minX||t.minRotation||0,i=t.min||t.minY||0,{left:s,top:i,width:(t.max||t.maxX||t.maxRotation||0)-s,height:(t.max||t.maxY||0)-i})},ee=f.createElement("div"),ie=""!==q(ee,"perspective"),se=q(ee,"transformOrigin").replace(/^ms/g,"Ms").replace(/([A-Z])/g,"-$1").toLowerCase(),re=q(ee,"transform"),ne=re.replace(/^ms/g,"Ms").replace(/([A-Z])/g,"-$1").toLowerCase(),ae={},oe={},le=function(){if(!T){var t="http://www.w3.org/2000/svg",e=f.createElementNS(t,"svg"),i=f.createElementNS(t,"rect");return i.setAttributeNS(null,"width","10"),i.setAttributeNS(null,"height","10"),e.appendChild(i),e}}(),he=window.SVGElement,ue=function(t){return!!(he&&"function"==typeof t.getBBox&&t.getCTM&&(!t.parentNode||t.parentNode.getBBox&&t.parentNode.getCTM))},_e=["class","viewBox","width","height","xml:space"],ce=function(t){if(!t.getBoundingClientRect||!t.parentNode)return{offsetTop:0,offsetLeft:0,scaleX:1,scaleY:1,offsetParent:p};if(t._gsSVGData&&t._gsSVGData.lastUpdate===e.ticker.frame)return t._gsSVGData;var i,s,r,n,a,o,l=t,h=t.style.cssText,u=t._gsSVGData=t._gsSVGData||{};if("svg"!==(t.nodeName+"").toLowerCase()&&t.getBBox){for(l=t.parentNode,i=t.getBBox();l&&"svg"!==(l.nodeName+"").toLowerCase();)l=l.parentNode;return u=ce(l),{offsetTop:i.y*u.scaleY,offsetLeft:i.x*u.scaleX,scaleX:u.scaleX,scaleY:u.scaleY,offsetParent:l||p}}for(;!l.offsetParent&&l.parentNode;)l=l.parentNode;for(t.parentNode.insertBefore(le,t),t.parentNode.removeChild(t),le.style.cssText=h,le.style[re]="none",a=_e.length;--a>-1;)o=t.getAttribute(_e[a]),o?le.setAttribute(_e[a],o):le.removeAttribute(_e[a]);return i=le.getBoundingClientRect(),n=le.firstChild.getBoundingClientRect(),r=l.offsetParent,r?(r===f.body&&p&&(r=p),s=r.getBoundingClientRect()):s={top:-I(),left:-z()},le.parentNode.insertBefore(t,le),t.parentNode.removeChild(le),u.scaleX=n.width/10,u.scaleY=n.height/10,u.offsetLeft=i.left-s.left,u.offsetTop=i.top-s.top,u.offsetParent=l.offsetParent||p,u.lastUpdate=e.ticker.frame,u},fe=function(t,i){if(i=i||{},!t||t===p||!t.parentNode)return{x:0,y:0};var s=G(t),r=se&&s?s.getPropertyValue(se):"50% 50%",n=r.split(" "),a=-1!==r.indexOf("left")?"0%":-1!==r.indexOf("right")?"100%":n[0],o=-1!==r.indexOf("top")?"0%":-1!==r.indexOf("bottom")?"100%":n[1];return("center"===o||null==o)&&(o="50%"),("center"===a||isNaN(parseFloat(a)))&&(a="50%"),t.getBBox&&ue(t)?(t._gsTransform||(e.set(t,{x:"+=0",overwrite:!1}),void 0===t._gsTransform.xOrigin&&console.log("Draggable requires at least GSAP 1.16.1")),r=t.getBBox(),n=ce(t),i.x=(t._gsTransform.xOrigin-r.x)*n.scaleX,i.y=(t._gsTransform.yOrigin-r.y)*n.scaleY):(i.x=-1!==a.indexOf("%")?t.offsetWidth*parseFloat(a)/100:parseFloat(a),i.y=-1!==o.indexOf("%")?t.offsetHeight*parseFloat(o)/100:parseFloat(o)),i},pe=function(t,e,i){var s,r,a,o,l,h;return t!==window&&t&&t.parentNode?(s=G(t),r=s?s.getPropertyValue(ne):t.currentStyle?t.currentStyle[re]:"1,0,0,1,0,0",r=(r+"").match(/(?:\-|\b)[\d\-\.e]+\b/g)||[1,0,0,1,0,0],r.length>6&&(r=[r[0],r[1],r[4],r[5],r[12],r[13]]),e&&(a=t.parentNode,h=t.getBBox&&ue(t)||void 0===t.offsetLeft&&"svg"===(t.nodeName+"").toLowerCase()?ce(t):t,o=h.offsetParent,l=a===p||a===f.body,void 0===n&&f.body&&re&&(n=function(){var t,e,i=f.createElement("div"),s=f.createElement("div");return s.style.position="absolute",f.body.appendChild(i),i.appendChild(s),t=s.offsetParent,i.style[re]="rotate(1deg)",e=s.offsetParent===t,f.body.removeChild(i),e}()),r[4]=Number(r[4])+e.x+(h.offsetLeft||0)-i.x-(l?0:a.scrollLeft)+(o?parseInt(K(o,"borderLeftWidth"),10)||0:0),r[5]=Number(r[5])+e.y+(h.offsetTop||0)-i.y-(l?0:a.scrollTop)+(o?parseInt(K(o,"borderTopWidth"),10)||0:0),!a||a.offsetParent!==o||n&&"100100"!==pe(a).join("")||(r[4]-=a.offsetLeft||0,r[5]-=a.offsetTop||0),a&&"fixed"===K(t,"position",!0)&&(r[4]+=z(),r[5]+=I())),r):[1,0,0,1,0,0]},de=function(t,e){if(!t||t===window||!t.parentNode)return[1,0,0,1,0,0];for(var i,s,r,n,a,o,l,h,u=fe(t,ae),_=fe(t.parentNode,oe),c=pe(t,u,_);(t=t.parentNode)&&t.parentNode&&t!==p;)u=_,_=fe(t.parentNode,u===ae?oe:ae),l=pe(t,u,_),i=c[0],s=c[1],r=c[2],n=c[3],a=c[4],o=c[5],c[0]=i*l[0]+s*l[2],c[1]=i*l[1]+s*l[3],c[2]=r*l[0]+n*l[2],c[3]=r*l[1]+n*l[3],c[4]=a*l[0]+o*l[2]+l[4],c[5]=a*l[1]+o*l[3]+l[5];return e&&(i=c[0],s=c[1],r=c[2],n=c[3],a=c[4],o=c[5],h=i*n-s*r,c[0]=n/h,c[1]=-s/h,c[2]=-r/h,c[3]=i/h,c[4]=(r*o-n*a)/h,c[5]=-(i*o-s*a)/h),c},me=function(t,e,i){var s=de(t),r=e.x,n=e.y;return i=i===!0?e:i||{},i.x=r*s[0]+n*s[2]+s[4],i.y=r*s[1]+n*s[3]+s[5],i},ge=function(t,e,i){var s=t.x*e[0]+t.y*e[2]+e[4],r=t.x*e[1]+t.y*e[3]+e[5];return t.x=s*i[0]+r*i[2]+i[4],t.y=s*i[1]+r*i[3]+i[5],t},ve=function(t,e){var i,s,r,n,a,o,l,h,u,_,c;return t===window?(n=I(),s=z(),r=s+(p.clientWidth||t.innerWidth||f.body.clientWidth||0),a=n+((t.innerHeight||0)-20<p.clientHeight?p.clientHeight:t.innerHeight||f.body.clientHeight||0)):(i=fe(t),s=-i.x,r=s+t.offsetWidth,n=-i.y,a=n+t.offsetHeight),t===e?{left:s,top:n,width:r-s,height:a-n}:(o=de(t),l=de(e,!0),h=ge({x:s,y:n},o,l),u=ge({x:r,y:n},o,l),_=ge({x:r,y:a},o,l),c=ge({x:s,y:a},o,l),s=Math.min(h.x,u.x,_.x,c.x),n=Math.min(h.y,u.y,_.y,c.y),{left:s,top:n,width:Math.max(h.x,u.x,_.x,c.x)-s,height:Math.max(h.y,u.y,_.y,c.y)-n})},ye=function(t){return t.length&&t[0]&&(t[0].nodeType&&t[0].style&&!t.nodeType||t[0].length&&t[0][0])?!0:!1},Te=function(t){var e,i,s,r=[],n=t.length;for(e=0;n>e;e++)if(i=t[e],ye(i))for(s=i.length,s=0;i.length>s;s++)r.push(i[s]);else r.push(i);return r},we="ontouchstart"in p&&"orientation"in window,xe=function(t){for(var e=t.split(","),i=(void 0!==ee.onpointerdown?"pointerdown,pointermove,pointerup,pointercancel":void 0!==ee.onmspointerdown?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":t).split(","),s={},r=8;--r>-1;)s[e[r]]=i[r],s[i[r]]=e[r];return s}("touchstart,touchmove,touchend,touchcancel"),be=function(t,e,i,s){t.addEventListener?t.addEventListener(xe[e]||e,i,s):t.attachEvent&&t.attachEvent("on"+e,i)},Pe=function(t,e,i){t.removeEventListener?t.removeEventListener(xe[e]||e,i):t.detachEvent&&t.detachEvent("on"+e,i)},Se=function(t){s=t.touches&&t.touches.length>C,Pe(t.target,"touchend",Se)},Ce=function(t){s=t.touches&&t.touches.length>C,be(t.target,"touchend",Se)},ke=function(t,e,i,s,r,n){var a,o,l,h={};if(e)if(1!==r&&e instanceof Array){for(h.end=a=[],l=e.length,o=0;l>o;o++)a[o]=e[o]*r;i+=1.1,s-=1.1}else h.end="function"==typeof e?function(i){return e.call(t,i)*r}:e;return(i||0===i)&&(h.max=i),(s||0===s)&&(h.min=s),n&&(h.velocity=0),h},Re=function(t){var e;return t&&t.getAttribute&&"BODY"!==t.nodeName?"true"===(e=t.getAttribute("data-clickable"))||"false"!==e&&(t.onclick||S.test(t.nodeName+"")||"true"===t.getAttribute("contentEditable"))?!0:Re(t.parentNode):!1},Ae=function(t,e){for(var i,s=t.length;--s>-1;)i=t[s],i.ondragstart=i.onselectstart=e?null:m,V(i,"userSelect",e?"text":"none")},Oe=function(){var t,e=f.createElement("div"),i=f.createElement("div"),s=i.style,r=f.body||ee;return s.display="inline-block",s.position="relative",e.style.cssText=i.innerHTML="width:90px; height:40px; padding:10px; overflow:auto; visibility: hidden",e.appendChild(i),r.appendChild(e),a=i.offsetHeight+18>e.scrollHeight,s.width="100%",re||(s.paddingRight="500px",t=e.scrollLeft=e.scrollWidth-e.clientWidth,s.left="-90px",t=t!==e.scrollLeft),r.removeChild(e),t}(),De=function(t,i){t=W(t),i=i||{};var s,r,n,o,l,h,u=f.createElement("div"),_=u.style,c=t.firstChild,p=0,d=0,m=t.scrollTop,g=t.scrollLeft,v=t.scrollWidth,y=t.scrollHeight,w=0,x=0,b=0;ie&&i.force3D!==!1?(l="translate3d(",h="px,0px)"):re&&(l="translate(",h="px)"),this.scrollTop=function(t,e){return arguments.length?(this.top(-t,e),void 0):-this.top()},this.scrollLeft=function(t,e){return arguments.length?(this.left(-t,e),void 0):-this.left()},this.left=function(s,r){if(!arguments.length)return-(t.scrollLeft+d);var n=t.scrollLeft-g,a=d;return(n>2||-2>n)&&!r?(g=t.scrollLeft,e.killTweensOf(this,!0,{left:1,scrollLeft:1}),this.left(-g),i.onKill&&i.onKill(),void 0):(s=-s,0>s?(d=0|s-.5,s=0):s>x?(d=0|s-x,s=x):d=0,(d||a)&&(l?this._suspendTransforms||(_[re]=l+-d+"px,"+-p+h):_.left=-d+"px",Oe&&d+w>=0&&(_.paddingRight=d+w+"px")),t.scrollLeft=0|s,g=t.scrollLeft,void 0)},this.top=function(s,r){if(!arguments.length)return-(t.scrollTop+p);var n=t.scrollTop-m,a=p;return(n>2||-2>n)&&!r?(m=t.scrollTop,e.killTweensOf(this,!0,{top:1,scrollTop:1}),this.top(-m),i.onKill&&i.onKill(),void 0):(s=-s,0>s?(p=0|s-.5,s=0):s>b?(p=0|s-b,s=b):p=0,(p||a)&&(l?this._suspendTransforms||(_[re]=l+-d+"px,"+-p+h):_.top=-p+"px"),t.scrollTop=0|s,m=t.scrollTop,void 0)},this.maxScrollTop=function(){return b},this.maxScrollLeft=function(){return x},this.disable=function(){for(c=u.firstChild;c;)o=c.nextSibling,t.appendChild(c),c=o;t===u.parentNode&&t.removeChild(u)},this.enable=function(){if(c=t.firstChild,c!==u){for(;c;)o=c.nextSibling,u.appendChild(c),c=o;t.appendChild(u),this.calibrate()}},this.calibrate=function(e){var i,o,l=t.clientWidth===s;m=t.scrollTop,g=t.scrollLeft,(!l||t.clientHeight!==r||u.offsetHeight!==n||v!==t.scrollWidth||y!==t.scrollHeight||e)&&((p||d)&&(i=this.left(),o=this.top(),this.left(-t.scrollLeft),this.top(-t.scrollTop)),(!l||e)&&(_.display="block",_.width="auto",_.paddingRight="0px",w=Math.max(0,t.scrollWidth-t.clientWidth),w&&(w+=K(t,"paddingLeft")+(a?K(t,"paddingRight"):0))),_.display="inline-block",_.position="relative",_.overflow="visible",_.verticalAlign="top",_.width="100%",_.paddingRight=w+"px",a&&(_.paddingBottom=K(t,"paddingBottom",!0)),T&&(_.zoom="1"),s=t.clientWidth,r=t.clientHeight,v=t.scrollWidth,y=t.scrollHeight,x=t.scrollWidth-s,b=t.scrollHeight-r,n=u.offsetHeight,_.display="block",(i||o)&&(this.left(i),this.top(o)))},this.content=u,this.element=t,this._suspendTransforms=!1,this.enable()},Me=function(i,n){t.call(this,i),i=W(i),r||(r=_.com.greensock.plugins.ThrowPropsPlugin),this.vars=n=n||{},this.target=i,this.x=this.y=this.rotation=0,this.dragResistance=parseFloat(n.dragResistance)||0,this.edgeResistance=isNaN(n.edgeResistance)?1:parseFloat(n.edgeResistance)||0,this.lockAxis=n.lockAxis,this.autoScroll=n.autoScroll||0,this.lockedAxis=null,this.allowEventDefault=!!n.allowEventDefault;var a,c,m,x,S,D,N,I,z,Y,q,G,H,Q,Z,$,ee,ie,se,re,ne,ae,oe,le,he,ue,_e,ce,fe,pe,ge,ve=(n.type||(T?"top,left":"x,y")).toLowerCase(),ye=-1!==ve.indexOf("x")||-1!==ve.indexOf("y"),Te=-1!==ve.indexOf("rotation"),Se=Te?"rotation":ye?"x":"left",Oe=ye?"y":"top",Le=-1!==ve.indexOf("x")||-1!==ve.indexOf("left")||"scroll"===ve,Ee=-1!==ve.indexOf("y")||-1!==ve.indexOf("top")||"scroll"===ve,Ie=n.minimumMovement||2,ze=this,Xe=O(n.trigger||n.handle||i),Fe={},Be=0,Ye=!1,Ue=n.clickableTest||Re,je=function(t){if(ze.autoScroll&&ze.isDragging&&(ie||Ye)){var e,s,r,n,a,o,l,h,u=i,_=15*ze.autoScroll;for(Ye=!1,A.scrollTop=null!=window.pageYOffset?window.pageYOffset:null!=p.scrollTop?p.scrollTop:f.body.scrollTop,A.scrollLeft=null!=window.pageXOffset?window.pageXOffset:null!=p.scrollLeft?p.scrollLeft:f.body.scrollLeft,n=ze.pointerX-A.scrollLeft,a=ze.pointerY-A.scrollTop;u&&!s;)s=B(u.parentNode),e=s?A:u.parentNode,r=s?{bottom:Math.max(p.clientHeight,window.innerHeight||0),right:Math.max(p.clientWidth,window.innerWidth||0),left:0,top:0}:e.getBoundingClientRect(),o=l=0,Ee&&(a>r.bottom-40&&(h=e._gsMaxScrollY-e.scrollTop)?(Ye=!0,l=Math.min(h,0|_*(1-Math.max(0,r.bottom-a)/40))):r.top+40>a&&e.scrollTop&&(Ye=!0,l=-Math.min(e.scrollTop,0|_*(1-Math.max(0,a-r.top)/40))),l&&(e.scrollTop+=l)),Le&&(n>r.right-40&&(h=e._gsMaxScrollX-e.scrollLeft)?(Ye=!0,o=Math.min(h,0|_*(1-Math.max(0,r.right-n)/40))):r.left+40>n&&e.scrollLeft&&(Ye=!0,o=-Math.min(e.scrollLeft,0|_*(1-Math.max(0,n-r.left)/40))),o&&(e.scrollLeft+=o)),s&&(o||l)&&(window.scrollTo(e.scrollLeft,e.scrollTop),Je(ze.pointerX+o,ze.pointerY+l)),u=e}if(ie){var d=ze.x,m=ze.y,g=1e-6;g>d&&d>-g&&(d=0),g>m&&m>-g&&(m=0),Te?(fe.data.rotation=ze.rotation=d,fe.setRatio(1)):c?(Ee&&c.top(m),Le&&c.left(d)):ye?(Ee&&(fe.data.y=m),Le&&(fe.data.x=d),fe.setRatio(1)):(Ee&&(i.style.top=m+"px"),Le&&(i.style.left=d+"px")),I&&!t&&J(ze,"drag","onDrag")}ie=!1},We=function(t,s){var r;i._gsTransform||!ye&&!Te||e.set(i,{x:"+=0",overwrite:!1}),ye?(ze.y=i._gsTransform.y,ze.x=i._gsTransform.x):Te?ze.x=ze.rotation=i._gsTransform.rotation:c?(ze.y=c.top(),ze.x=c.left()):(ze.y=parseInt(i.style.top,10)||0,ze.x=parseInt(i.style.left,10)||0),!re&&!ne||s||(re&&(r=re(ze.x),r!==ze.x&&(ze.x=r,Te&&(ze.rotation=r),ie=!0)),ne&&(r=ne(ze.y),r!==ze.y&&(ze.y=r,ie=!0)),ie&&je(!0)),n.onThrowUpdate&&!t&&n.onThrowUpdate.apply(n.onThrowUpdateScope||ze,n.onThrowUpdateParams||d)},qe=function(){var t,e,s,r;N=!1,c?(c.calibrate(),ze.minX=Y=-c.maxScrollLeft(),ze.minY=G=-c.maxScrollTop(),ze.maxX=z=ze.maxY=q=0,N=!0):n.bounds&&(t=te(n.bounds,i.parentNode),Te?(ze.minX=Y=t.left,ze.maxX=z=t.left+t.width,ze.minY=G=ze.maxY=q=0):void 0!==n.bounds.maxX||void 0!==n.bounds.maxY?(t=n.bounds,ze.minX=Y=t.minX,ze.minY=G=t.minY,ze.maxX=z=t.maxX,ze.maxY=q=t.maxY):(e=te(i,i.parentNode),ze.minX=Y=K(i,Se)+t.left-e.left,ze.minY=G=K(i,Oe)+t.top-e.top,ze.maxX=z=Y+(t.width-e.width),ze.maxY=q=G+(t.height-e.height)),Y>z&&(ze.minX=z,ze.maxX=z=Y,Y=ze.minX),G>q&&(ze.minY=q,ze.maxY=q=G,G=ze.minY),Te&&(ze.minRotation=Y,ze.maxRotation=z),N=!0),n.liveSnap&&(s=n.liveSnap===!0?n.snap||{}:n.liveSnap,r=s instanceof Array||"function"==typeof s,Te?(re=Ze(r?s:s.rotation,Y,z,1),ne=null):(Le&&(re=Ze(r?s:s.x||s.left||s.scrollLeft,Y,z,c?-1:1)),Ee&&(ne=Ze(r?s:s.y||s.top||s.scrollTop,G,q,c?-1:1))))},Ve=function(t,e){var s,a,o;t&&r?(t===!0&&(s=n.snap||{},a=s instanceof Array||"function"==typeof s,t={resistance:(n.throwResistance||n.resistance||1e3)/(Te?10:1)},Te?t.rotation=ke(ze,a?s:s.rotation,z,Y,1,e):(Le&&(t[Se]=ke(ze,a?s:s.x||s.left||s.scrollLeft,z,Y,c?-1:1,e||"x"===ze.lockedAxis)),Ee&&(t[Oe]=ke(ze,a?s:s.y||s.top||s.scrollTop,q,G,c?-1:1,e||"y"===ze.lockedAxis)))),ze.tween=o=r.to(c||i,{throwProps:t,ease:n.ease||_.Power3.easeOut,onComplete:n.onThrowComplete,onCompleteParams:n.onThrowCompleteParams,onCompleteScope:n.onThrowCompleteScope||ze,onUpdate:n.fastMode?n.onThrowUpdate:We,onUpdateParams:n.fastMode?n.onThrowUpdateParams:null,onUpdateScope:n.onThrowUpdateScope||ze},isNaN(n.maxDuration)?2:n.maxDuration,isNaN(n.minDuration)?.5:n.minDuration,isNaN(n.overshootTolerance)?1-ze.edgeResistance+.2:n.overshootTolerance),n.fastMode||(c&&(c._suspendTransforms=!0),o.render(o.duration(),!0,!0),We(!0,!0),ze.endX=ze.x,ze.endY=ze.y,Te&&(ze.endRotation=ze.x),o.play(0),We(!0,!0),c&&(c._suspendTransforms=!1))):N&&ze.applyBounds()},Ge=function(){le=de(i.parentNode,!0),le[1]||le[2]||1!=le[0]||1!=le[3]||0!=le[4]||0!=le[5]||(le=null)},He=function(){var t=1-ze.edgeResistance;Ge(),c?(qe(),D=c.top(),S=c.left()):(Qe()?(We(!0,!0),qe()):ze.applyBounds(),Te?(ee=me(i,{x:0,y:0}),We(!0,!0),S=ze.x,D=ze.y=Math.atan2(ee.y-x,m-ee.x)*g):(_e=i.parentNode?i.parentNode.scrollTop||0:0,ce=i.parentNode?i.parentNode.scrollLeft||0:0,D=K(i,Oe),S=K(i,Se))),N&&t&&(S>z?S=z+(S-z)/t:Y>S&&(S=Y-(Y-S)/t),Te||(D>q?D=q+(D-q)/t:G>D&&(D=G-(G-D)/t)))},Qe=function(){return ze.tween&&ze.tween.isActive()},Ze=function(t,e,i,s){return"function"==typeof t?function(r){var n=ze.isPressed?1-ze.edgeResistance:1;return t.call(ze,r>i?i+(r-i)*n:e>r?e+(r-e)*n:r)*s}:t instanceof Array?function(s){for(var r,n,a=t.length,o=0,l=v;--a>-1;)r=t[a],n=r-s,0>n&&(n=-n),l>n&&r>=e&&i>=r&&(o=a,l=n);return t[o]}:isNaN(t)?function(t){return t}:function(){return t*s}},$e=function(t){var s,r;if(a&&!ze.isPressed&&t&&!("mousedown"===t.type&&30>y()-ue&&xe[ze.pointerEvent.type])){if(he=Qe(),ze.pointerEvent=t,xe[t.type]?(oe=-1!==t.type.indexOf("touch")?t.currentTarget:f,be(oe,"touchend",ti),be(oe,"touchmove",Ke),be(oe,"touchcancel",ti),be(f,"touchstart",Ce)):(oe=null,be(f,"mousemove",Ke)),ge=null,be(f,"mouseup",ti),t&&t.target&&be(t.target,"mouseup",ti),ae=Ue.call(ze,t.target)&&!n.dragClickables)return be(t.target,"change",ti),J(ze,"press","onPress"),Ae(Xe,!0),void 0;if(pe=!oe||Le===Ee||c||ze.vars.allowNativeTouchScrolling===!1?!1:Le?"y":"x",T?t=j(t,!0):pe||ze.allowEventDefault||(t.preventDefault(),t.preventManipulation&&t.preventManipulation()),t.changedTouches?(t=Z=t.changedTouches[0],$=t.identifier):t.pointerId?$=t.pointerId:Z=null,C++,M(je),x=ze.pointerY=t.pageY,m=ze.pointerX=t.pageX,(pe||ze.autoScroll)&&U(i.parentNode),!ze.autoScroll||Te||c||!i.parentNode||i.getBBox||!i.parentNode._gsMaxScrollX||w.parentNode||(w.style.width=i.parentNode.scrollWidth+"px",i.parentNode.appendChild(w)),He(),le&&(s=m*le[0]+x*le[2]+le[4],x=m*le[1]+x*le[3]+le[5],m=s),ze.tween&&ze.tween.kill(),e.killTweensOf(c||i,!0,Fe),c&&e.killTweensOf(i,!0,{scrollTo:1}),ze.tween=ze.lockedAxis=null,(n.zIndexBoost||!Te&&!c&&n.zIndexBoost!==!1)&&(i.style.zIndex=Me.zIndex++),ze.isPressed=!0,I=!(!n.onDrag&&!ze._listeners.drag),!Te)for(r=Xe.length;--r>-1;)V(Xe[r],"cursor",n.cursor||"move");J(ze,"press","onPress")}},Ke=function(t){var e,i,r,n,o=t;if(a&&!s&&ze.isPressed&&t){if(ze.pointerEvent=t,e=t.changedTouches){if(t=e[0],t!==Z&&t.identifier!==$){for(n=e.length;--n>-1&&(t=e[n]).identifier!==$;);if(0>n)return}}else if(t.pointerId&&$&&t.pointerId!==$)return;if(T)t=j(t,!0);else{if(oe&&pe&&!ge&&(i=t.pageX,r=t.pageY,le&&(n=i*le[0]+r*le[2]+le[4],r=i*le[1]+r*le[3]+le[5],i=n),ge=Math.abs(i-m)>Math.abs(r-x)&&Le?"x":"y",ze.vars.lockAxisOnTouchScroll!==!1&&(ze.lockedAxis="x"===ge?"y":"x","function"==typeof ze.vars.onLockAxis&&ze.vars.onLockAxis.call(ze,o)),k&&pe===ge))return ti(o),void 0;ze.allowEventDefault||pe&&(!ge||pe===ge)||o.cancelable===!1||(o.preventDefault(),o.preventManipulation&&o.preventManipulation())}ze.autoScroll&&(Ye=!0),Je(t.pageX,t.pageY)}},Je=function(t,e){var i,s,r,n,a,o,l=1-ze.dragResistance,h=1-ze.edgeResistance;ze.pointerX=t,ze.pointerY=e,Te?(n=Math.atan2(ee.y-e,t-ee.x)*g,a=ze.y-n,ze.y=n,a>180?D-=360:-180>a&&(D+=360),r=S+(D-n)*l):(le&&(o=t*le[0]+e*le[2]+le[4],e=t*le[1]+e*le[3]+le[5],t=o),s=e-x,i=t-m,Ie>s&&s>-Ie&&(s=0),Ie>i&&i>-Ie&&(i=0),(ze.lockAxis||ze.lockedAxis)&&(i||s)&&(o=ze.lockedAxis,o||(ze.lockedAxis=o=Le&&Math.abs(i)>Math.abs(s)?"y":Ee?"x":null,o&&"function"==typeof ze.vars.onLockAxis&&ze.vars.onLockAxis.call(ze,ze.pointerEvent)),"y"===o?s=0:"x"===o&&(i=0)),r=S+i*l,n=D+s*l),re||ne?(re&&(r=re(r)),ne&&(n=ne(n))):N&&(r>z?r=z+(r-z)*h:Y>r&&(r=Y+(r-Y)*h),Te||(n>q?n=q+(n-q)*h:G>n&&(n=G+(n-G)*h))),Te||(r=Math.round(r),n=Math.round(n)),(ze.x!==r||ze.y!==n&&!Te)&&(ze.x=ze.endX=r,Te?ze.endRotation=r:ze.y=ze.endY=n,ie=!0,ze.isDragging||(ze.isDragging=!0,J(ze,"dragstart","onDragStart")))},ti=function(t,e){if(a&&ze.isPressed&&(!t||!$||e||!t.pointerId||t.pointerId===$)){ze.isPressed=!1;var s,r,o,l,h=t,u=ze.isDragging;if(oe?(Pe(oe,"touchend",ti),Pe(oe,"touchmove",Ke),Pe(oe,"touchcancel",ti),Pe(f,"touchstart",Ce)):Pe(f,"mousemove",Ke),Pe(f,"mouseup",ti),t&&t.target&&Pe(t.target,"mouseup",ti),ie=!1,w.parentNode&&w.parentNode.removeChild(w),ae)return t&&Pe(t.target,"change",ti),Ae(Xe,!1),J(ze,"release","onRelease"),J(ze,"click","onClick"),ae=!1,void 0;if(L(je),!Te)for(r=Xe.length;--r>-1;)V(Xe[r],"cursor",n.cursor||"move");if(u&&(Be=R=y(),ze.isDragging=!1),C--,t){if(T&&(t=j(t,!1)),s=t.changedTouches,s&&(t=s[0],t!==Z&&t.identifier!==$)){for(r=s.length;--r>-1&&(t=s[r]).identifier!==$;);if(0>r)return}ze.pointerEvent=h,ze.pointerX=t.pageX,ze.pointerY=t.pageY}return h&&!u?(he&&(n.snap||n.bounds)&&Ve(n.throwProps),J(ze,"release","onRelease"),k&&"touchmove"===h.type||(J(ze,"click","onClick"),l=h.target||h.srcElement||i,l.click?l.click():f.createEvent&&(o=f.createEvent("MouseEvents"),o.initEvent("click",!0,!0),l.dispatchEvent(o)),ue=y())):(Ve(n.throwProps),T||ze.allowEventDefault||!h||!n.dragClickables&&Ue.call(ze,h.target)||!u||pe&&(!ge||pe!==ge)||h.cancelable===!1||(h.preventDefault(),h.preventManipulation&&h.preventManipulation()),J(ze,"release","onRelease")),u&&J(ze,"dragend","onDragEnd"),!0}},ei=function(t){if(t&&ze.isDragging){var e=t.target||t.srcElement||i.parentNode,s=e.scrollLeft-e._gsScrollX,r=e.scrollTop-e._gsScrollY;(s||r)&&(m-=s,x-=r,e._gsScrollX+=s,e._gsScrollY+=r,Je(ze.pointerX,ze.pointerY))}},ii=function(t){var e=y(),i=40>e-ue,s=40>e-Be;(ze.isPressed||s||i)&&(t.preventDefault?(t.preventDefault(),(i||s&&ze.vars.suppressClickOnDrag!==!1)&&t.stopImmediatePropagation()):t.returnValue=!1,t.preventManipulation&&t.preventManipulation())};se=Me.get(this.target),se&&se.kill(),this.startDrag=function(t){$e(t),ze.isDragging||(ze.isDragging=!0,J(ze,"dragstart","onDragStart"))},this.drag=Ke,this.endDrag=function(t){ti(t,!0)},this.timeSinceDrag=function(){return ze.isDragging?0:(y()-Be)/1e3},this.hitTest=function(t,e){return Me.hitTest(ze.target,t,e)},this.getDirection=function(t,e){var i,s,n,a,o,l,h="velocity"===t&&r?t:"object"!=typeof t||Te?"start":"element";return"element"===h&&(o=Ne(ze.target),l=Ne(t)),i="start"===h?ze.x-S:"velocity"===h?r.getVelocity(this.target,Se):o.left+o.width/2-(l.left+l.width/2),Te?0>i?"counter-clockwise":"clockwise":(e=e||2,s="start"===h?ze.y-D:"velocity"===h?r.getVelocity(this.target,Oe):o.top+o.height/2-(l.top+l.height/2),n=Math.abs(i/s),a=1/e>n?"":0>i?"left":"right",e>n&&(""!==a&&(a+="-"),a+=0>s?"up":"down"),a)},this.applyBounds=function(t){var e,i;return t&&n.bounds!==t?(n.bounds=t,ze.update(!0)):(We(!0),qe(),N&&(e=ze.x,i=ze.y,N&&(e>z?e=z:Y>e&&(e=Y),i>q?i=q:G>i&&(i=G)),(ze.x!==e||ze.y!==i)&&(ze.x=ze.endX=e,Te?ze.endRotation=e:ze.y=ze.endY=i,ie=!0,je())),ze)},this.update=function(t){var e=ze.x,i=ze.y;return Ge(),t?ze.applyBounds():(ie&&je(),We(!0)),ze.isPressed&&(Le&&Math.abs(e-ze.x)>.01||Ee&&Math.abs(i-ze.y)>.01&&!Te)&&He(),ze},this.enable=function(t){var s,o,l;if("soft"!==t){for(o=Xe.length;--o>-1;)l=Xe[o],be(l,"mousedown",$e),be(l,"touchstart",$e),be(l,"click",ii,!0),Te||V(l,"cursor",n.cursor||"move"),V(l,"touchCallout","none"),V(l,"touchAction",Le===Ee||c?"none":Le?"pan-y":"pan-x");Ae(Xe,!1)}return X(ze.target,ei),a=!0,r&&"soft"!==t&&r.track(c||i,ye?"x,y":Te?"rotation":"top,left"),c&&c.enable(),i._gsDragID=s="d"+P++,b[s]=this,c&&(c.element._gsDragID=s),e.set(i,{x:"+=0",overwrite:!1}),fe={t:i,data:T?Q:i._gsTransform,tween:{},setRatio:T?function(){e.set(i,H)}:CSSPlugin._internals.setTransformRatio||CSSPlugin._internals.set3DTransformRatio},this.update(!0),ze},this.disable=function(t){var e,s,n=this.isDragging;if(!Te)for(e=Xe.length;--e>-1;)V(Xe[e],"cursor",null);if("soft"!==t){for(e=Xe.length;--e>-1;)s=Xe[e],V(s,"touchCallout",null),V(s,"touchAction",null),Pe(s,"mousedown",$e),Pe(s,"touchstart",$e),Pe(s,"click",ii);Ae(Xe,!0),oe&&(Pe(oe,"touchcancel",ti),Pe(oe,"touchend",ti),Pe(oe,"touchmove",Ke)),Pe(f,"mouseup",ti),Pe(f,"mousemove",Ke)}return F(i,ei),a=!1,r&&"soft"!==t&&r.untrack(c||i,ye?"x,y":Te?"rotation":"top,left"),c&&c.disable(),L(je),this.isDragging=this.isPressed=ae=!1,n&&J(this,"dragend","onDragEnd"),ze},this.enabled=function(t,e){return arguments.length?t?this.enable(e):this.disable(e):a},this.kill=function(){return e.killTweensOf(c||i,!0,Fe),ze.disable(),delete b[i._gsDragID],ze},-1!==ve.indexOf("scroll")&&(c=this.scrollProxy=new De(i,E({onKill:function(){ze.isPressed&&ti(null)}},n)),i.style.overflowY=Ee&&!we?"auto":"hidden",i.style.overflowX=Le&&!we?"auto":"hidden",i=c.content),n.force3D!==!1&&e.set(i,{force3D:!0}),Te?Fe.rotation=1:(Le&&(Fe[Se]=1),Ee&&(Fe[Oe]=1)),Te?(H=u,Q=H.css,H.overwrite=!1):ye&&(H=Le&&Ee?o:Le?l:h,Q=H.css,H.overwrite=!1),this.enable()},Le=Me.prototype=new t;Le.constructor=Me,Le.pointerX=Le.pointerY=0,Le.isDragging=Le.isPressed=!1,Me.version="0.13.0",Me.zIndex=1e3,be(f,"touchcancel",function(){}),be(f,"contextmenu",function(){var t;for(t in b)b[t].isPressed&&b[t].endDrag()}),Me.create=function(t,i){"string"==typeof t&&(t=e.selector(t));for(var s=ye(t)?Te(t):[t],r=s.length;--r>-1;)s[r]=new Me(s[r],i);return s},Me.get=function(t){return b[(W(t)||{})._gsDragID]},Me.timeSinceDrag=function(){return(y()-R)/1e3};var Ne=function(t,e){var i=t.pageX!==e?{left:t.pageX,top:t.pageY,right:t.pageX+1,bottom:t.pageY+1}:t.nodeType||t.left===e||t.top===e?W(t).getBoundingClientRect():t;return i.right===e&&i.width!==e?(i.right=i.left+i.width,i.bottom=i.top+i.height):i.width===e&&(i={width:i.right-i.left,height:i.bottom-i.top,right:i.right,left:i.left,bottom:i.bottom,top:i.top}),i};return Me.hitTest=function(t,e,i){if(t===e)return!1;var s,r,n,a=Ne(t),o=Ne(e),l=o.left>a.right||o.right<a.left||o.top>a.bottom||o.bottom<a.top;return l||!i?!l:(n=-1!==(i+"").indexOf("%"),i=parseFloat(i)||0,s={left:Math.max(a.left,o.left),top:Math.max(a.top,o.top)},s.width=Math.min(a.right,o.right)-s.left,s.height=Math.min(a.bottom,o.bottom)-s.top,0>s.width||0>s.height?!1:n?(i*=.01,r=s.width*s.height,r>=a.width*a.height*i||r>=o.width*o.height*i):s.width>i&&s.height>i)},w.style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;",Me},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(t){"use strict";var e=function(){return(_gsScope.GreenSockGlobals||_gsScope)[t]};"function"==typeof define&&define.amd?define(["TweenLite"],e):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),require("../plugins/CSSPlugin.js"),module.exports=e())}("Draggable");
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。