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.4 to 3.0.5

2

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

@@ -5,0 +5,0 @@ "main": "virtual-scroller.js",

@@ -198,6 +198,25 @@ import {ATTRIBUTES, EVENTS, CLASSES, DATA} from "./constants";

*/
var lastScrollTop = 0;
var lastScrollLeft = 0;
var scrollManager = ScrollManager(config, renderManager);
scrollManager.subscribe(_.throttle(
// renderManager might have already been set to null in API.destroy
(scrollLeft, scrollTop) => renderManager && renderManager.render(scrollManager),
(scrollLeft, scrollTop) => {
// renderManager might have already been set to null in API.destroy
if (!renderManager) {
return;
}
/*
Optimization: Only render if the scroll delta is bigger than a row / column.
We can only do this with native scrolling because in the other case
renderManager.render() is responsible for the scrolling itself (using css translation).
*/
if (config.useNativeScrolling &&
Math.abs(scrollTop - lastScrollTop) <= config.rowHeight &&
(!config.renderColumn || Math.abs(scrollLeft - lastScrollLeft) <= config.columnWidth)) {
return;
}
lastScrollTop = scrollTop;
lastScrollLeft = scrollLeft;
renderManager.render(scrollManager)
},
Math.round(1000 / config.fps),

@@ -204,0 +223,0 @@ {leading: true, trailing: true}

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