简体   繁体   中英

drawing a straight line with arrow in Javascript

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

So can any one tell me the solution?

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

If you just care about animation (and maybe keyboard control), canvas is faster. If you want dynamic interaction (eg, the ability to click on the line, arrow, etc.), then SVG is best. SVGWeb and ExplorerCanvas offer some compatibility with IE for both of these...

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

If instead of an arrow, a line is enough, please 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 append the arrow object to the code, if you need help on this, let me know.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM