There has been a lot of questions regarding the coördinate system of svg elements but no one has got me solving my problem.
Look at this fiddle: https://jsfiddle.net/archemedia/4f54jnm8/
In the startup function, I added connect("A", "B")
which connects element A and B with the line.
When I try to connect("A", "D")
the line doesn't position correctly, due to the transform attribute of element D.
Could someone provide me with a clear solution? I don't want to use a svg library, I just want plain javascript code which solves the problem, preferably by adding it to the fiddle.
Many thanks