Visualization of Dijkstra's algorithm in JavaScript