wheel-direction

1.0.4 • Public • Published

wheel-direction

なにこれ

方向付きWheelEventの実装。

使い方

$ npm i wheel-direction
import 'wheel-direction';
 
element.addEventListener('wheel-up', (e)=>{
    console.log(e.type); // wheel-up
});

Events

  • wheel-up
  • wheel-down
  • wheel-left
  • wheel-right
  • wheel-front
  • wheel-back

API

ON/OFF

import ctrler from 'wheel-direction';
 
ctrler.enable();
ctrler.disable();
ctrler.toggle();

addEventListener options

// {passive: false}
const mod = import('wheel-direction?once=true&passive=false');

or

<!-- {once: true} -->
<script type="module" src="./wheel-direction.mjs?once=true"></script>

Readme

Keywords

Package Sidebar

Install

npm i wheel-direction

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

3.14 kB

Total Files

3

Last publish

Collaborators

  • honeo