UNPKG

591 BMarkdownView Raw
1# Normalize Wheel
2Mouse wheel normalization across multiple multiple browsers.
3
4## Original source
5This code is extracted and from Facebook's [Fixed Data Table](https://github.com/facebook/fixed-data-table). Apart from import fixes, the code is unmodified.
6
7## Usage
8Just add it as an dependency in npm.
9
10You can use it as follows:
11
12```js
13import normalizeWheel from 'normalize-wheel';
14
15document.addEventListener('mousewheel', function (event) {
16 const normalized = normalizeWheel(event);
17
18 console.log(normalized.pixelX, normalized.pixelY);
19});
20```
21
22## License
23See the `LICENSE` file.