2.0.0 • Published 3 years ago
get-client-xy v2.0.0
get-client-xy
Get coordinates from a mouse or touch event.
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.