%PDF- %PDF-
| Direktori : /data/old/home/stash/atlassian/stash/3.7.1/atlassian-stash/static/util/ |
| Current File : //data/old/home/stash/atlassian/stash/3.7.1/atlassian-stash/static/util/scroll-min.js |
define("util/scroll",["jquery","lodash","util/feature-detect","exports"],function(G,E,B,D){var H={waitForImages:false,cancelIfScrolled:false,duration:400,getScrollPadding:function(){return document.documentElement.clientHeight/4}};function A(I,K,J){G("html, body").animate({scrollTop:Math.max(0,I-K)},J)}function C(K,J){var L=G.extend({},H,J);var M=false;if(L.cancelIfScrolled){G(document).one("scroll",function(){M=true})}function I(){if(!M){var N=K.offset();if(N){A(N.top,L.getScrollPadding(),L.duration)}}}if(L.waitForImages){G(document).imagesLoaded(I)}else{I()}}function F(N,M){var K=B.cssTransform();var J={left:0,top:0};var O=-1;if(M&&M.withDocument===true){O=1}function L(Q,P){J.left=(Q==null?J.left:Q);J.top=(P==null?J.top:P);return(J.left===0&&J.top===0)?null:J}var I;switch(K){case"msTransform":I=function(P){N.style[K]=P===null?"":"translate("+(Math.round(P.left)*O)+"px, "+(Math.round(P.top)*O)+"px)"};break;case undefined:I=function(P){N.style.left=P===null?"":(Math.round(P.left)*O);N.style.top=P===null?"":(Math.round(P.top)*O)};break;default:I=function(P){N.style[K]=P===null?"":"translate3d("+(Math.round(P.left)*O)+"px, "+(Math.round(P.top)*O)+"px, 0)"}}return E.compose(I,L)}D.scrollTo=C;D.fakeScroll=F});