1

I'm trying to make a drawing application (just for fun)

And I cloud not figure out a way of getting the cursor's coordinates when the user clicks and holds on a canvas element

KrisGeor
  • 53
  • 1
  • 6
  • Possible duplicate of [HTML5 Canvas Mouse coordinates](https://stackoverflow.com/questions/10403214/html5-canvas-mouse-coordinates) – Makyen Aug 20 '17 at 04:13
  • Additional duplicate: [How do I get the coordinates of a mouse click on a canvas element?](https://stackoverflow.com/q/55677) – Makyen Aug 20 '17 at 04:15
  • Please [edit] your question to clarify. When are you wanting to get the cursor's coordinates? When it moves? When you click? Are you wanting the coordinates relative to the document, or the canvas? – Makyen Aug 20 '17 at 04:27
  • So, you want to get the coordinates between: when the user presses down on the (main) mouse button through when they release that mouse button. Is that correct? Do you want the coordinates relative to the page, or the canvas? It would help significantly if you were to supply the HTML which you have for the page, or at least the part which is the canvas. – Makyen Aug 20 '17 at 04:32

0 Answers0