New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

virtual-scroll

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

virtual-scroll - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "virtual-scroll",
"version": "1.0.0",
"version": "1.0.1",
"description": "Smooth fake scroll using CSS transform",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -40,2 +40,3 @@ virtual-scroll

- preventTouch: If true, automatically call `e.preventDefault` on touchMove. *Default is false.*
- unpreventTouchClass: Elements with this class won't `preventDefault` on touchMove. For instance, useful for a scrolling text inside a VirtualScroll-controled element. *Default is `vs-touchmove-allowed`*.
- limitInertia: if true, will leverage [Lethargy](https://github.com/d4nyll/lethargy) to avoid everlasting scroll events (mostly on Apple Mouse, Trackpad, and free-wheel mouse). *Default is false.*

@@ -42,0 +43,0 @@

@@ -29,2 +29,3 @@ 'use strict';

preventTouch: false,
unpreventTouchClass: 'vs-touchmove-allowed',
limitInertia: false

@@ -100,3 +101,8 @@ });

VirtualScroll.prototype._onTouchMove = function(e) {
if(this.options.preventTouch) e.preventDefault();
var options = this.options;
if(options.preventTouch
&& !e.target.classList.contains(options.unpreventTouchClass)) {
e.preventDefault();
}
var evt = this._event;

@@ -106,4 +112,4 @@

evt.deltaX = (t.pageX - this.touchStartX) * this.options.touchMultiplier;
evt.deltaY = (t.pageY - this.touchStartY) * this.options.touchMultiplier;
evt.deltaX = (t.pageX - this.touchStartX) * options.touchMultiplier;
evt.deltaY = (t.pageY - this.touchStartY) * options.touchMultiplier;

@@ -110,0 +116,0 @@ this.touchStartX = t.pageX;

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