Search code examples
touchmobile-website

Touch events - can I get the size of the touch/finger?


Is there anyway to get the area of a touch event? Something akin to a circle the size of the user's fingertip? I'm interested in getting this data in a mobile web context, for example somebody opening my web page on their mobile device and using their finger to click a button.

Thanks in advance!


Solution

  • Touch.radiusY and Touch.radiusX: https://developer.mozilla.org/en-US/docs/Web/API/Touch/radiusX