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

@hscmap/inertial-wheel

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hscmap/inertial-wheel - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

1

lib/index.d.ts

@@ -22,2 +22,3 @@ export interface Callbacks {

t2: number;
baseInterval: number;
constructor(target: HTMLElement, cb: Callbacks);

@@ -24,0 +25,0 @@ teardown(): void;

3

lib/index.js

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

this.t2 = defaults.t2;
this.baseInterval = 1000 / 60;
this.magicTrackpadDetector = new magic_trackpad_detector_1.MagicTrackpadDetector();

@@ -67,3 +68,3 @@ this.wheel = function (e) {

this.v = clamp(this.v, -1, 1);
this.cb.wheel && this.cb.wheel(new InertialWheelEvent(this.v, this.lastNativeEvent));
this.cb.wheel && this.cb.wheel(new InertialWheelEvent(dt / this.baseInterval * this.v, this.lastNativeEvent));
this.lastT = now;

@@ -70,0 +71,0 @@ };

{
"name": "@hscmap/inertial-wheel",
"version": "0.5.0",
"version": "0.5.1",
"main": "./lib/index.js",

@@ -5,0 +5,0 @@ "types": "./lib/index.d.ts",

@@ -28,2 +28,3 @@ import { MagicTrackpadDetector } from "@hscmap/magic-trackpad-detector"

t2 = defaults.t2
baseInterval = 1000 / 60

@@ -93,3 +94,3 @@ constructor(readonly target: HTMLElement, private cb: Callbacks) {

this.v = clamp(this.v, -1, 1)
this.cb.wheel && this.cb.wheel(new InertialWheelEvent(this.v, this.lastNativeEvent))
this.cb.wheel && this.cb.wheel(new InertialWheelEvent(dt / this.baseInterval * this.v, this.lastNativeEvent))

@@ -96,0 +97,0 @@ this.lastT = now

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