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

angular2-virtual-scroll

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-virtual-scroll - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

package-lock.json

4

CHANGELOG.md
# v0.2.2
* Fixes #94
# v0.2.1

@@ -3,0 +7,0 @@

14

dist/virtual-scroll.js

@@ -128,3 +128,6 @@ "use strict";

var itemsPerCol = Math.max(1, Math.floor(viewHeight / childHeight));
var scrollTop = Math.max(0, el.scrollTop);
var elScrollTop = this.parentScroll instanceof Window
? (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0)
: el.scrollTop;
var scrollTop = Math.max(0, elScrollTop);
if (itemsPerCol === 1 && Math.floor(scrollTop / this.scrollHeight * itemCount) + itemsPerRowByCalc >= itemCount) {

@@ -149,7 +152,10 @@ itemsPerRow = itemsPerRowByCalc;

var offsetTop = this.getElementsOffset();
var elScrollTop = this.parentScroll instanceof Window
? (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0)
: el.scrollTop;
this.scrollHeight = d.childHeight * d.itemCount / d.itemsPerRow;
if (el.scrollTop > this.scrollHeight) {
el.scrollTop = this.scrollHeight + offsetTop;
if (elScrollTop > this.scrollHeight) {
elScrollTop = this.scrollHeight + offsetTop;
}
var scrollTop = Math.max(0, el.scrollTop - offsetTop);
var scrollTop = Math.max(0, elScrollTop - offsetTop);
var indexByScrollTop = scrollTop / this.scrollHeight * d.itemCount / d.itemsPerRow;

@@ -156,0 +162,0 @@ var end = Math.min(d.itemCount, Math.ceil(indexByScrollTop) * d.itemsPerRow + d.itemsPerRow * (d.itemsPerCol + 1));

{
"name": "angular2-virtual-scroll",
"version": "0.2.1",
"version": "0.2.2",
"description": "Angular 2 module for virtual -infinite- list. Supports multi-column",

@@ -5,0 +5,0 @@ "main": "dist/virtual-scroll.js",

Sorry, the diff of this file is not supported yet

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