get-client-xy
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

get-client-xy

Get coordinates from a mouse or touch event.

NPM Badge

Install

npm install get-client-xy

Usage

const getClientXY = require("get-client-xy")

const [x, y] = getClientXY(event)

API

getClientXY(event)

event

Type: MouseEvent | TouchEvent

The event to extract the data from.

Package Sidebar

Install

npm i get-client-xy

Weekly Downloads

524

Version

2.0.0

License

MIT

Unpacked Size

2.56 kB

Total Files

5

Last publish

Collaborators

  • dfcreative
  • richienb
  • dy