Skip to content

Richienb/get-client-xy

Repository files navigation

get-client-xy

Get coordinates from a mouse or touch event.

NPM Badge

Install

npm install get-client-xy

Usage

import getClientXY from "get-client-xy"

const [x, y] = getClientXY(event)

API

getClientXY(event)

event

Type: MouseEvent | TouchEvent

The event to extract the data from.

About

Get coordinates from a mouse or touch event.

Resources

Code of conduct

Contributing

Stars

4 stars

Watchers

1 watching

Forks

Sponsor this project

Packages

 
 
 

Contributors