1. normalize-wheel
Mouse wheel normalization across multiple multiple browsers.
normalize-wheel
Package: normalize-wheel
Last modified: Wed, 22 Jun 2022 05:35:17 GMT
Version: 1.0.1
License: BSD-3-Clause
Downloads: 1,798,345

Install

npm install normalize-wheel
yarn add normalize-wheel

Normalize Wheel

Mouse wheel normalization across multiple multiple browsers.

Original source

This code is extracted and from Facebook's Fixed Data Table. Apart from import fixes, the code is unmodified.

Usage

Just add it as an dependency in npm.

You can use it as follows:

 import normalizeWheel from 'normalize-wheel';

document.addEventListener('mousewheel', function (event) {
    const normalized = normalizeWheel(event);

    console.log(normalized.pixelX, normalized.pixelY);
});

License

See the LICENSE file.

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin