Drawing a straight line with an arrow in Javascript

I am working with a Javascript project and I want to draw a line with an arrow and easily rotate in any direction. I prefer HTML4 instead of HTML5.

So can anyone tell me a solution?

what I want in this link .... but not in HTML5, but in HTML4
http://deepliquid.com/projects/blog/arrows2.html

+3
source share
2 answers

If you just like the animation (and possibly keyboard control), the canvas is faster. If you need dynamic interaction (for example, the ability to click on a line, arrow, etc.), then it is best to use SVG. SVGWeb and ExplorerCanvas offer some IE compatibility for both of them ...

+1
source

I asked almost the same thing and ended up using Raphael (after the first version 2)

If instead of the arrow there is enough line, look at:

How to draw a line between draggable and droppable?

demo:

http://www.balexandre.com/jQuery/draganddrop/testing_DragAndDrop.htm

If you really need to draw an arrow at the end, you can add an arrow object to the code, if you need help with this, let me know.

0

All Articles