Skip to content

Commit

Permalink
Include built files.
Browse files Browse the repository at this point in the history
Required for travis build to pass.
  • Loading branch information
Caden Lovelace committed Feb 14, 2015
1 parent 655bfb6 commit b11dbf4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
17 changes: 13 additions & 4 deletions build/ng-infinite-scroll.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* ng-infinite-scroll - v1.2.0 - 2014-12-02 */
/* ng-infinite-scroll - v1.2.0 - 2015-02-14 */
var mod;

mod = angular.module('infinite-scroll', []);
Expand All @@ -13,17 +13,19 @@ mod.directive('infiniteScroll', [
infiniteScrollContainer: '=',
infiniteScrollDistance: '=',
infiniteScrollDisabled: '=',
infiniteScrollUseDocumentBottom: '='
infiniteScrollUseDocumentBottom: '=',
infiniteScrollListenForEvent: '@'
},
link: function(scope, elem, attrs) {
var changeContainer, checkWhenEnabled, container, handleInfiniteScrollContainer, handleInfiniteScrollDisabled, handleInfiniteScrollDistance, handleInfiniteScrollUseDocumentBottom, handler, height, immediateCheck, offsetTop, pageYOffset, scrollDistance, scrollEnabled, throttle, useDocumentBottom, windowElement;
var changeContainer, checkWhenEnabled, container, handleInfiniteScrollContainer, handleInfiniteScrollDisabled, handleInfiniteScrollDistance, handleInfiniteScrollUseDocumentBottom, handler, height, immediateCheck, offsetTop, pageYOffset, scrollDistance, scrollEnabled, throttle, unregisterEventListener, useDocumentBottom, windowElement;
windowElement = angular.element($window);
scrollDistance = null;
scrollEnabled = null;
checkWhenEnabled = null;
container = null;
immediateCheck = true;
useDocumentBottom = false;
unregisterEventListener = null;
height = function(elem) {
elem = elem[0] || elem;
if (isNaN(elem.offsetHeight)) {
Expand Down Expand Up @@ -110,7 +112,11 @@ mod.directive('infiniteScroll', [
handler = throttle(handler, THROTTLE_MILLISECONDS);
}
scope.$on('$destroy', function() {
return container.unbind('scroll', handler);
container.unbind('scroll', handler);
if (unregisterEventListener != null) {
unregisterEventListener();
return unregisterEventListener = null;
}
});
handleInfiniteScrollDistance = function(v) {
return scrollDistance = parseFloat(v) || 0;
Expand Down Expand Up @@ -141,6 +147,9 @@ mod.directive('infiniteScroll', [
}
};
changeContainer(windowElement);
if (scope.infiniteScrollListenForEvent) {
unregisterEventListener = $rootScope.$on(scope.infiniteScrollListenForEvent, handler);
}
handleInfiniteScrollContainer = function(newContainer) {
if ((newContainer == null) || newContainer.length === 0) {
return;
Expand Down
4 changes: 2 additions & 2 deletions build/ng-infinite-scroll.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b11dbf4

Please sign in to comment.