;(function(){
    var G = dijkstra.hexGrid(2);

    var view = new dijkstra.GraphView(G, document.getElementById('graph'), {
        placement: function(position){ return {
            'x': 100 * position.x,
            'y': 100 * position.y
        }},
        radius: 20,
        between: 0.3
    });

    var algorithm = new dijkstra.ShortestPath(G);
    algorithm.setSource(G.vertices[0]);
    algorithm.setTarget(G.vertices[G.vertices.length - 1]);
    algorithm.setPathFrom(G.vertices[G.vertices.length - 1]);

    view.visualize(algorithm);

    function loop(){
        view.update();
        requestAnimationFrame(loop);
    };
    loop();

    document.body.addEventListener('keypress', function(event){
        if (event.keyCode == 32) {
            algorithm.step();
        }
    });

    window.G = G;
})();

@@ -287,16 +287,452 @@
 een: 0.3
+,%0A        vertex: %7B%0A            events : %7B%0A                mouseenter: function(event)%7B%0A                    var id = this.getAttribute('data-vertex');%0A                    var v = G.findVertex(id);%0A                    algorithm.setPathFrom(v);%0A                    console.log(this);%0A                    console.log(event);%0A                    console.log(id);%0A                    console.log(v);%0A                %7D%0A            %7D%0A        %7D
 %0A    %7D);

Set fromPath on mouseenter