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