diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2016-09-28 20:25:25 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2016-09-28 20:25:25 -0400 |
| commit | 0d9a9353e756b7cdcabae85b4d4a4840910ed3df (patch) | |
| tree | 56a700baa0d04e81656a86df05c6c0f9b5ad24bf /www/lib/ionic-scroll-sista/dist/ionic.scroll.sista.min.js | |
| parent | d78c434d088d1fee3f9d805347a2c5a5a88d19e3 (diff) | |
switched to "scroll-sista" for sqeezing headers
Former-commit-id: 55992626fea99156d7d1531efaa830c11186d8ca
Diffstat (limited to 'www/lib/ionic-scroll-sista/dist/ionic.scroll.sista.min.js')
| -rw-r--r-- | www/lib/ionic-scroll-sista/dist/ionic.scroll.sista.min.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/www/lib/ionic-scroll-sista/dist/ionic.scroll.sista.min.js b/www/lib/ionic-scroll-sista/dist/ionic.scroll.sista.min.js new file mode 100644 index 00000000..8bd3716d --- /dev/null +++ b/www/lib/ionic-scroll-sista/dist/ionic.scroll.sista.min.js @@ -0,0 +1 @@ +!function(e,t){"use strict";e.module("jett.ionic.scroll.sista",["ionic"]).directive("scrollSista",["$document","$timeout","$rootScope","$ionicScrollDelegate",function(a,n,r,o){function i(e,t,a,n){var r;for(n=n||10;e.parentNode&&n--;){if(r=e.parentNode.getAttribute(t),r&&r===a)return e.parentNode;e=e.parentNode}return null}var c=400,l=2*c,s=c+"ms",u=t.Platform.isAndroid()?!1:!0;return{restrict:"A",link:function(r,c,f){function d(e,a,r){r&&!e.style[t.CSS.TRANSITION_DURATION]&&(e.style[t.CSS.TRANSITION_DURATION]=r,n(function(){e.style[t.CSS.TRANSITION_DURATION]=""},l,!1)),e.style[t.CSS.TRANSFORM]="translate3d(0, "+-a+"px, 0)"}function b(){N=0,v=0,$=0}function h(){var e;if(y=q.querySelector('[nav-bar="cached"] .bar-header'),g=q.querySelector('[nav-bar="active"] .bar-header'))switch(A=g.offsetHeight,T=A,I=q.querySelectorAll(".tabs"),I=I[I.length-1],I&&(k=I.offsetHeight,I.parentNode.classList.contains("tabs-top")?(V=!0,T+=k):I.parentNode.classList.contains("tabs-bottom")&&(F=!0)),e=i(c[0],"nav-view","active"),M=e&&e.querySelector(".bar-subheader"),M&&(R=M.offsetHeight,T+=R),x=2*T,O=w=C=x,k=k||0,R=R||0,f.scrollSista){case"header":C=A,w=V?A:0;break;case"header-tabs":L=V?k:0,C=V?A+k:A;break;case"tabs-subheader":O=0,L=V?T-A:R,U=V?R:0;break;case"tabs":O=0,C=V?k:0;break;case"subheader":O=0,w=0;break;case"header-subheader":w=V?A:0;break;case"subheader-header":L=R,U=V?R:0,w=V?A:0;break;default:L=V?T-A:R,U=V?R:0}}function S(a,n){var r=Math.max(0,1-a/A);g&&(d(g,a,n),e.forEach(g.children,function(e){e.style.opacity=r,u&&(e.style[t.CSS.TRANSFORM]="scale("+r+","+r+")")})),y&&d(y,a,n)}function p(e,t){var a,n,r=c[0].style,o=e>L?e-L:0;M&&(n=e>_?e-_:0,d(M,Math.min(C,n),t)),I&&(a=Math.min(w,e>U?e-U:0),F&&(a=-a,r.bottom=Math.max(0,k-e)+"px"),d(I,a,t)),S(Math.min(O,o),t),r.top=Math.max(0,T-e)+"px"}function m(e,a){t.requestAnimationFrame(function(){p(e,a)})}var N,v,$,y,g,A,T,M,R,I,k,x,O,w,C,H=!0,q=a[0].body,D=f.delegateHandle?o.$getByHandle(f.delegateHandle):o,E=D.getScrollView(),V=!1,F=!1,L=0,U=0,_=0;r.$on("scroll.refreshComplete",function(){b()}),r.$parent.$on("$ionicView.beforeLeave",function(){H=!0,p(0),g=null,y=null}),r.$parent.$on("$ionicView.beforeEnter",function(){E&&E.scrollTo(0,0)}),r.$parent.$on("$ionicView.afterEnter",function(){b(),n(function(){h(),H=!1},20,!1)}),c.bind("scroll",function(e){if(!H){e=e.originalEvent||e;var t=0,a=e.detail.scrollTop;N=a>=0?Math.min(x,Math.max(0,N+a-$)):0,E.getScrollMax().top-a<=T&&(N=0,t=s),$=a,v!==N&&(v=N,m(N,t))}})}}}])}(angular,ionic);
\ No newline at end of file |
