Possible Duplicate:
Simple task (SVG vs. Canvas)
I am trying to draw/paint a number of circles and want to identify them with IDs on mouse over or mouse click.
I was trying to do this using KineticJS, not able to achieve as I am beginner at javascript.
Apart from that I just want to capture the normal mouse events (left/right click) and won’t be moving or playing with these circles apart from mouse events. So is the KineticJS is the right lib. to use ? How about Raphael JS/d3 etc. {By any chance can this is easily achieved by just Jquery/Dojo)
Only important thing is to draw large number of circles, ability to identify them uniquely and associate mouse events with them.
PS: Yes I Also want to accomplish the ability to zoom in/out the space/canvas in which these circles are drawn.
Please suggest. Thanks in Advance.
Try this below code, You can find the circle ID by mousemove on the circle