0.1.5 • Published 7 years ago

is-pointer-inside v0.1.5

Weekly downloads
103
License
MIT
Repository
github
Last release
7 years ago

is-pointer-inside Build Status

Check if pointer is inside the element

Install

npm install --save is-pointer-inside

Usage

import isPointerInside from 'is-pointer-inside';

document.addEventListener('mousemove', event => {
  const el = document.querySelector('.hello');
  isPointerInside(el, event); // true if pointer inside the el
}, false);

API

isPointerInside(element, event)

Return true if pointer inside the element.

element

Type: element

DOM element.

event

Type: object

Pointer event object with pageX and pageY props.

Related

License

MIT

0.1.5

7 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

9 years ago

0.1.0

9 years ago