I\'m trying to create a bridge-like shape with an svg using javascript. With the following html I get the overall shape, but the close path is wrong: