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

dynamic-virtual-scroller

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamic-virtual-scroller - npm Package Compare versions

Comparing version 3.0.20 to 3.0.21

7

package.json
{
"name": "dynamic-virtual-scroller",
"version": "3.0.20",
"version": "3.0.21",
"description": "A virtual scroller for the web that can handle dynamic row and column sizes.",

@@ -26,3 +26,6 @@ "main": "virtual-scroller.js",

"watch:js": "webpack --watch",
"dev": "npm run build:css && npm run watch:js"
"dev": "npm run build:css && npm run watch:js",
"version:patch": "npm version patch -m ':bookmark: v%s'",
"version:minor": "npm version minor -m ':bookmark: v%s'",
"version:major": "npm version major -m ':bookmark: v%s'"
},

@@ -29,0 +32,0 @@ "repository": {

@@ -29,10 +29,13 @@ import {ATTRIBUTES, EVENTS, CLASSES} from "./constants";

if (!lastRowState) {
return;
return 0;
}
var maxScrollLeft = lastRowState.canvasSize - renderManager.sizeCache.containerWidth;
return maxScrollLeft;
return Math.max(maxScrollLeft, 0);
};
// if state.canvasSize or sizeCache.containerHeight is not set yet, the result is NaN. In that case we return 0
var getMaxScrollTop = renderManager => (renderManager.state.canvasSize - renderManager.sizeCache.containerHeight) || 0;
var getMaxScrollTop = renderManager => {
// if state.canvasSize or sizeCache.containerHeight is not set yet, the result is NaN. In that case we return 0
const maxScrollTop = (renderManager.state.canvasSize - renderManager.sizeCache.containerHeight) || 0;
return Math.max(maxScrollTop, 0);
};

@@ -72,4 +75,4 @@ var debouncedResetIsScrolling = _.debounce(() => setIsScrolling(false), 100);

scrollTop = Math.round(scrollTop);
scrollTop = Math.min(scrollTop, maxScrollTop);
scrollTop = Math.max(scrollTop, 0);
scrollTop = Math.min(scrollTop, maxScrollTop);

@@ -89,4 +92,4 @@ if (scrollTop !== state.scrollTop) {

scrollLeft = Math.round(scrollLeft);
scrollLeft = Math.min(scrollLeft, maxScrollLeft);
scrollLeft = Math.max(scrollLeft, 0);
scrollLeft = Math.min(scrollLeft, maxScrollLeft);

@@ -93,0 +96,0 @@ if (scrollLeft !== state.scrollLeft) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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