HTML Canvas Click Position
How to get the click position on an HTML5 Canvas? In this video you will learn how to get the coordinates of a click on a canvas. We use the addEventListener JavaScript function with type click, to detect where a user clicks on a map. At the clicked x and y coordinate, we draw a small red circle. Want to learn more about drawing circles on a canvas? Check out this video: https://www.youtube.com/watch?v=kF3AjQ1gb5E
How to get the click position on an HTML5 Canvas? In this video you will learn how to get the coordinates of a click on a canvas. We use the addEventListener JavaScript function with type click, to detect where a user clicks on a map. At the clicked x and y coordinate, we draw a small red circle. Want to learn more about drawing circles on a canvas? Check out this video: https://www.youtube.com/watch?v=kF3AjQ1gb5E