I am using thooClock jquery library for designing an analog clock which work pretty fine. https://github.com/thooyork/thooClock
But now I want to move it's hour and minutes hand similar to this website: https://www.roomrecess.com/Tools/InteractiveClock/play.html
I'm able to click on canvas but not sure how access that specific line stroke
$('#canvas').click(function(e){
console.log('Canvas clicked');
});
Can anyone please help me with this.
Thanks in advance.
From the DOM perspective canvas is a simple element that responds to clicks as a whole. There are sophisticated methods, allowing you to calculate whether you click happened on a hand or not, but it's better to use some higher level libraries to deal with object manipulation over the canvas like fabric.js.