项目原始demo,不改动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Deze repo is gearchiveerd. U kunt bestanden bekijken en het klonen, maar niet pushen of problemen/pull-requests openen.

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