when we add a point by clicking the canvas, it updates the diagram