diff --git a/bower.json b/bower.json index 0dfd630..84c9ba2 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "ngInfiniteScroll", - "version": "1.1.2", + "version": "1.2.0", "main": "build/ng-infinite-scroll.js", "ignore": [ "**/.*", @@ -12,6 +12,6 @@ ".*" ], "dependencies": { - "angular": ">=1.1.3" + "angular": ">=1.2.0" } } diff --git a/build/ng-infinite-scroll.js b/build/ng-infinite-scroll.js index a2aceec..49d7ee5 100644 --- a/build/ng-infinite-scroll.js +++ b/build/ng-infinite-scroll.js @@ -1,4 +1,4 @@ -/* ng-infinite-scroll - v1.1.2 - 2014-12-01 */ +/* ng-infinite-scroll - v1.2.0 - 2014-12-02 */ var mod; mod = angular.module('infinite-scroll', []); diff --git a/build/ng-infinite-scroll.min.js b/build/ng-infinite-scroll.min.js index 29024fb..3370fc8 100644 --- a/build/ng-infinite-scroll.min.js +++ b/build/ng-infinite-scroll.min.js @@ -1,2 +1,2 @@ -/* ng-infinite-scroll - v1.1.2 - 2014-12-01 */ +/* ng-infinite-scroll - v1.2.0 - 2014-12-02 */ var mod;mod=angular.module("infinite-scroll",[]),mod.value("THROTTLE_MILLISECONDS",null),mod.directive("infiniteScroll",["$rootScope","$window","$interval","THROTTLE_MILLISECONDS",function(a,b,c,d){return{scope:{infiniteScroll:"&",infiniteScrollContainer:"=",infiniteScrollDistance:"=",infiniteScrollDisabled:"=",infiniteScrollUseDocumentBottom:"="},link:function(e,f,g){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;return x=angular.element(b),t=null,u=null,i=null,j=null,q=!0,w=!1,p=function(a){return a=a[0]||a,isNaN(a.offsetHeight)?a.document.documentElement.clientHeight:a.offsetHeight},r=function(a){return a[0].getBoundingClientRect&&!a.css("none")?a[0].getBoundingClientRect().top+s(a):void 0},s=function(a){return a=a[0]||a,isNaN(window.pageYOffset)?a.document.documentElement.scrollTop:a.ownerDocument.defaultView.pageYOffset},o=function(){var b,c,d,g,h;return j===x?(b=p(j)+s(j[0].document.documentElement),d=r(f)+p(f)):(b=p(j),c=0,void 0!==r(j)&&(c=r(j)),d=r(f)-c+p(f)),w&&(d=p((f[0].ownerDocument||f[0].document).documentElement)),g=d-b,h=g<=p(j)*t+1,h?(i=!0,u?e.$$phase||a.$$phase?e.infiniteScroll():e.$apply(e.infiniteScroll):void 0):i=!1},v=function(a,b){var d,e,f;return f=null,e=0,d=function(){var b;return e=(new Date).getTime(),c.cancel(f),f=null,a.call(),b=null},function(){var g,h;return g=(new Date).getTime(),h=b-(g-e),0>=h?(clearTimeout(f),c.cancel(f),f=null,e=g,a.call()):f?void 0:f=c(d,h,1)}},null!=d&&(o=v(o,d)),e.$on("$destroy",function(){return j.unbind("scroll",o)}),m=function(a){return t=parseFloat(a)||0},e.$watch("infiniteScrollDistance",m),m(e.infiniteScrollDistance),l=function(a){return u=!a,u&&i?(i=!1,o()):void 0},e.$watch("infiniteScrollDisabled",l),l(e.infiniteScrollDisabled),n=function(a){return w=a},e.$watch("infiniteScrollUseDocumentBottom",n),n(e.infiniteScrollUseDocumentBottom),h=function(a){return null!=j&&j.unbind("scroll",o),j=a,null!=a?j.bind("scroll",o):void 0},h(x),k=function(a){if(null!=a&&0!==a.length){if(a instanceof HTMLElement?a=angular.element(a):"function"==typeof a.append?a=angular.element(a[a.length-1]):"string"==typeof a&&(a=angular.element(document.querySelector(a))),null!=a)return h(a);throw new Exception("invalid infinite-scroll-container attribute.")}},e.$watch("infiniteScrollContainer",k),k(e.infiniteScrollContainer||[]),null!=g.infiniteScrollParent&&h(angular.element(f.parent())),null!=g.infiniteScrollImmediateCheck&&(q=e.$eval(g.infiniteScrollImmediateCheck)),c(function(){return q?o():void 0},0,1)}}}]); \ No newline at end of file diff --git a/package.json b/package.json index 9eb4c94..5754fa1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ng-infinite-scroll", - "version": "1.1.2", + "version": "1.2.0", "description": "Infinite scrolling for AngularJS", "repository": { "type": "git",