Regarding movement of line from one point to another

Hello Team ,
I am making a basic project in which I made a line and I am trying to move the start pont or end point of line , From another end point Like line have two points start and end point If i pick the end point and move it from another end point it will be movable and the length or old line is incresed or decreased according to the movement . Kindly tell me the answer of that.

You could use DragControls to move line start / end anchor objects and then change the line position array to match them, like so: