Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created September 8, 2021 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/5fe0a47e802b76a3f6208855f6cfe43a to your computer and use it in GitHub Desktop.
Save parzibyte/5fe0a47e802b76a3f6208855f6cfe43a to your computer and use it in GitHub Desktop.
const obtenerXReal = (clientX) => clientX - $canvas.getBoundingClientRect().left;
const obtenerYReal = (clientY) => clientY - $canvas.getBoundingClientRect().top
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment