javascript labels added and line movement changed