In Easel.js you draw a line like this:
lineE.graphics
.moveTo(x1,y1)
.setStrokeStyle(3)
.beginStroke("black")
.lineTo(x2,y2);
But to change its coordinates I am having to erase everything:
lineE.graphics
.clear() <-----------Why??????
.moveTo(newX1,newY1)
.setStrokeStyle(3)
.beginStroke("black")
.lineTo(newX2,newY2);
How can I keep other properties like stroke color while changing the coordinates of the line. I am drawing a line between to moving objects. There should be a more elegant way.