JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 236452
  • Score
    100M100P100Q177898F
  • License BSD-3-Clause

Mouse wheel normalization across multiple multiple browsers.

Package Exports

  • normalize-wheel-es
  • normalize-wheel-es/dist/index.js
  • normalize-wheel-es/dist/index.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (normalize-wheel-es) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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-es';

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

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

License

See the LICENSE file.