1 | # Normalize Wheel
|
2 | Mouse wheel normalization across multiple multiple browsers.
|
3 |
|
4 | ## Original source
|
5 | This 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
|
8 | Just add it as an dependency in npm.
|
9 |
|
10 | You can use it as follows:
|
11 |
|
12 | ```js
|
13 | import normalizeWheel from 'normalize-wheel';
|
14 |
|
15 | document.addEventListener('mousewheel', function (event) {
|
16 | const normalized = normalizeWheel(event);
|
17 |
|
18 | console.log(normalized.pixelX, normalized.pixelY);
|
19 | });
|
20 | ```
|
21 |
|
22 | ## License
|
23 | See the `LICENSE` file.
|