get-client-xy

Get coordinates from a mouse or touch event.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
get-client-xy
402.0.02 years ago8 years agoMinified + gzip package size for get-client-xy in KB

Readme

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.