https://github.com/basilfx/normalize-wheel
Mouse wheel normalization across multiple multiple browsers.
https://github.com/basilfx/normalize-wheel
javascript mouse-wheel-normalization typescript
Last synced: 11 months ago
JSON representation
Mouse wheel normalization across multiple multiple browsers.
- Host: GitHub
- URL: https://github.com/basilfx/normalize-wheel
- Owner: basilfx
- License: other
- Created: 2016-05-27T08:37:20.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2021-11-22T19:49:45.000Z (over 4 years ago)
- Last Synced: 2025-04-10T19:43:21.816Z (about 1 year ago)
- Topics: javascript, mouse-wheel-normalization, typescript
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 126
- Watchers: 4
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Normalize Wheel
Mouse wheel normalization across multiple multiple browsers.
## Original source
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.
## Usage
Just add it as an dependency in npm.
You can use it as follows:
```js
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.