Reputation:
My situation here is that, I have asp Imagebuttons
on my web page which are dynamically generated. When I Click on one ImageButton
I see the other dynamically created ImageButtons
which are related to it (Relation is maintained in Database). Now when I clicked on any Imagebutton
I need to draw a line between the clicked ImageButton
and the related Imagebuttons
which get displayed on the web page. As I am working with web application and not windows application I cannot access the drawing library. So is there any way to draw lines using javascript or jquery. Everything here click event, Imagebuttons
are dynamic.
Upvotes: 2
Views: 4156
Reputation: 10773
There are a lot of options:
http://jsbin.com/enime3/1/edit
http://raphaeljs.com/
http://www.amaslo.com/2012/06/drawing-diagonal-line-in-htmlcssjs-with.html
Similar questions on SO:
How to draw a line between 2 elements using JQuery and refreshing that line?
Easiest way to "draw" simple lines over an image with jQuery and save to Rails DB?
Upvotes: 3