This part is targeting to fix the backward-animation bug. 
Reseting the view every time to rescale the edges was causing the graph to flash when updating. the other parts were fixing that.