JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 776
  • Score
    100M100P100Q101443F
  • License MIT

Get clientX/clientY from an event

Package Exports

  • get-client-xy

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (get-client-xy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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.