birbal Posted April 21, 2011 Share Posted April 21, 2011 How can i determine the position cordinate on a mouseclick in a canvas element (relative to the canvas element)?any help will be appriciated. Link to comment Share on other sites More sharing options...
Fmdpa Posted April 21, 2011 Share Posted April 21, 2011 You could subtract the coordinates of the canvas element from the event.pageX & event.pageY properties. canvas.style.left and canvas.style.top won't work, however, if the element is being pushed around by previous elements. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.