Probably a more mathematical question, but here it goes ...
What I want to do is two HTML elements that should be connected by an animated line on the canvas background
Here is a fiddle with a simplified version of what I want to do.
http://jsfiddle.net/loupax/zUqXn/
There are actually lines, but they are outside the canvas, and if you use the element inspector, you can see the coordinates of the drawn lines in the canvas. Can someone help me with what I am doing wrong and the lines have gone from outside?
This is proof that the lines are drawn, but inappropriate. (replacement of the working phase and canvas size with fixed sizes)
http://jsfiddle.net/loupax/zUqXn/8/
EDIT It seems that what I'm trying to do is not possible for a liquid layout. After many troubles, I found that the Canvas element is its own plane, and there is no safe way to map snap coordinates to canvas coordinates without fixed dimensions
source share