BookSystem/frontend/node_modules/normalize-wheel-es
2026-05-08 18:04:30 +08:00
..
dist feat(frontend):实现前端管理页面,添加用户、角色、权限的CRUD 2026-05-08 18:04:30 +08:00
index.d.ts feat(frontend):实现前端管理页面,添加用户、角色、权限的CRUD 2026-05-08 18:04:30 +08:00
LICENSE feat(frontend):实现前端管理页面,添加用户、角色、权限的CRUD 2026-05-08 18:04:30 +08:00
package.json feat(frontend):实现前端管理页面,添加用户、角色、权限的CRUD 2026-05-08 18:04:30 +08:00
README.md feat(frontend):实现前端管理页面,添加用户、角色、权限的CRUD 2026-05-08 18:04:30 +08:00

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.