Probably more of a math question, but here it goes...
What I want to do is two HTML elements to be connected by an animated line on a background canvas
Here is a fiddle with a simplified version of what I want to do.
http://jsfiddle.net/loupax/zUqXn/
The lines are actually there, but they are outside of the canvas, and if you use your element inspector you can see the coordinates of the drawn lines in the canvas. Could someone help me on what I'm doing wrong and the lines get drawn out of place?
This is the proof that the lines are drawn but out of place. (replaced fluid stage and canvas size with fixed dimensions)
http://jsfiddle.net/loupax/zUqXn/8/
EDIT Looks like what I'm trying to do is not possible for a fluid layout. After a lot of trouble I found out that the Canvas element is it's own plane and there is no safe way to match anchor coordinates with canvas coordinates with no fixed sizes