User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
algorithm:dijkstras [2016/06/11 15:26]
will Always highlight source node.
algorithm:dijkstras [2016/06/28 22:59] (current)
will Fix showing incorrect highlighted edge.
Line 301: Line 301:
     // Highlight current edge.     // Highlight current edge.
     var i = x.lookupInScope("​i"​);​     var i = x.lookupInScope("​i"​);​
 +    var inInnerLoop = n && n.lineno >= 17 && n.lineno <= 28;
     var link = svg.selectAll("​line"​).data(links);​     var link = svg.selectAll("​line"​).data(links);​
     link.classed("​checking",​ function(d) {     link.classed("​checking",​ function(d) {
-        return (typeof i === "​number"​ && currentNode && currentNode.edges.length > i) &&+        return (typeof i === "​number" ​&& inInnerLoop ​&& currentNode && currentNode.edges.length > i) &&
             (currentNode.edges[i] === d || currentNode.edges[i].inverse === d);             (currentNode.edges[i] === d || currentNode.edges[i].inverse === d);
     });     });
algorithm/dijkstras.1465684016.txt.gz · Last modified: 2016/06/11 15:26 by will