npm.io
2.0.0 • Published 5 years ago

get-client-xy

Licence
MIT
Version
2.0.0
Deps
0
Size
2 kB
Vulns
0
Weekly
0
Stars
4

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.

Keywords