Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular2-infinite-scroll

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-infinite-scroll - npm Package Compare versions

Comparing version 0.2.6-5 to 0.2.6-6

13

bundles/angular2-infinite-scroll.js

@@ -37,3 +37,2 @@ System.registerDynamic('src/scroller', ['rxjs/Observable', 'rxjs/add/observable/fromEvent', 'rxjs/add/observable/timer', 'rxjs/add/operator/throttle', 'rxjs/add/operator/filter', 'rxjs/add/operator/delay'], true, function ($__require, exports, module) {

this.lastScrollPosition = 0;
this.reachedEnd = false;
this.isContainerWindow = Object.prototype.toString.call(this.windowElement).includes('Window');

@@ -119,13 +118,3 @@ this.documentElement = this.isContainerWindow ? this.windowElement.document.documentElement : null;

}).subscribe(function (ev) {
!_this.reachedEnd && _this.handler();
setTimeout(function () {
var container = _this.positionResolver.calculatePoints(_this.$elementRef);
var reachedEndOfContainer = container.scrolledUntilNow >= container.totalToScroll;
if (!_this.reachedEnd && reachedEndOfContainer) {
_this.reachedEnd = true;
_this.handler();
} else if (!reachedEndOfContainer) {
_this.reachedEnd = false;
}
}, throttle_1 + 50);
return _this.handler();
});

@@ -132,0 +121,0 @@ }

2

package.json
{
"name": "angular2-infinite-scroll",
"version": "0.2.6-5",
"version": "0.2.6-6",
"description": "An infinite scroll directive for angular2",

@@ -5,0 +5,0 @@ "main": "angular2-infinite-scroll.js",

@@ -36,3 +36,2 @@ import { ElementRef } from '@angular/core';

private positionResolver;
private reachedEnd;
constructor(windowElement: Window | ElementRef | any, $interval: Function, $elementRef: ElementRef, infiniteScrollDownCallback: Function, infiniteScrollUpCallback: Function, infiniteScrollDownDistance: number, infiniteScrollUpDistance: number, infiniteScrollParent: Window | ElementRef | any, infiniteScrollThrottle: number, isImmediate: boolean, horizontal: boolean, alwaysCallback: boolean, scrollDisabled: boolean, _positionResolver: PositionResolverFactory);

@@ -39,0 +38,0 @@ defineContainer(): void;

@@ -26,3 +26,2 @@ "use strict";

this.lastScrollPosition = 0;
this.reachedEnd = false;
this.isContainerWindow = Object.prototype.toString.call(this.windowElement).includes('Window');

@@ -109,16 +108,3 @@ this.documentElement = this.isContainerWindow ? this.windowElement.document.documentElement : null;

.filter(function (ev) { return _this.scrollEnabled; })
.subscribe(function (ev) {
!_this.reachedEnd && _this.handler();
setTimeout(function () {
var container = _this.positionResolver.calculatePoints(_this.$elementRef);
var reachedEndOfContainer = container.scrolledUntilNow >= container.totalToScroll;
if (!_this.reachedEnd && reachedEndOfContainer) {
_this.reachedEnd = true;
_this.handler();
}
else if (!reachedEndOfContainer) {
_this.reachedEnd = false;
}
}, throttle_1 + 50);
});
.subscribe(function (ev) { return _this.handler(); });
}

@@ -137,2 +123,2 @@ };

exports.Scroller = Scroller;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Nyb2xsZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzY3JvbGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0EsMkJBQTJCLGlCQUFpQixDQUFDLENBQUE7QUFJN0MsUUFBTywrQkFBK0IsQ0FBQyxDQUFBO0FBQ3ZDLFFBQU8sMkJBQTJCLENBQUMsQ0FBQTtBQUNuQyxRQUFPLDRCQUE0QixDQUFDLENBQUE7QUFDcEMsUUFBTywwQkFBMEIsQ0FBQyxDQUFBO0FBQ2xDLFFBQU8seUJBQXlCLENBQUMsQ0FBQTtBQUloQyxDQUFDO0FBRUY7SUFpQkUsa0JBQ1UsYUFBd0MsRUFDeEMsU0FBbUIsRUFDbkIsV0FBdUIsRUFDdkIsMEJBQW9DLEVBQ3BDLHdCQUFrQyxFQUMxQywwQkFBa0MsRUFDbEMsd0JBQWdDLEVBQ2hDLG9CQUErQyxFQUN2QyxzQkFBOEIsRUFDOUIsV0FBb0IsRUFD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VyLCAnc2Nyb2xsJylcbiAgICAgICAgLnRocm90dGxlKGV2ID0+IE9ic2VydmFibGUudGltZXIodGhyb3R0bGUpKVxuICAgICAgICAuZmlsdGVyKGV2ID0+IHRoaXMuc2Nyb2xsRW5hYmxlZClcbiAgICAgICAgLnN1YnNjcmliZShldiA9PiB0aGlzLmhhbmRsZXIoKSk7XG4gICAgfVxuICB9XG5cbiAgY2xlYW4gKCkge1xuICAgIGlmICh0aGlzLmRpc3Bvc2VTY3JvbGwpIHtcbiAgICAgIHRoaXMuZGlzcG9zZVNjcm9sbC51bnN1YnNjcmliZSgpO1xuICAgIH1cbiAgfVxuXG4gIGhhbmRsZUluZmluaXRlU2Nyb2xsRGlzYWJsZWQgKHNjcm9sbERpc2FibGVkOiBib29sZWFuKSB7XG4gICAgdGhpcy5zY3JvbGxFbmFibGVkID0gIXNjcm9sbERpc2FibGVkO1xuICB9XG59XG5cbmludGVyZmFjZSBEZWNvcmF0b3JJbnZvY2F0aW9uIHtcbiAgdHlwZTogRnVuY3Rpb247XG4gIGFyZ3M/OiBhbnlbXTtcbn1cbiJdfQ==
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc