# Differences

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

 algorithm:dijkstras [2016/06/11 15:15]will Working viz algorithm:dijkstras [2016/06/28 22:59]will Fix showing incorrect highlighted edge. Both sides previous revision Previous revision 2016/06/28 22:59 will Fix showing incorrect highlighted edge.2016/06/11 15:26 will Always highlight source node.2016/06/11 15:15 will Working viz2016/05/24 00:05 will Working code.2016/05/23 23:44 will 2016/05/23 23:22 will in progress Next revision Previous revision 2016/06/28 22:59 will Fix showing incorrect highlighted edge.2016/06/11 15:26 will Always highlight source node.2016/06/11 15:15 will Working viz2016/05/24 00:05 will Working code.2016/05/23 23:44 will 2016/05/23 23:22 will in progress Line 274: Line 274: ​ ​ var distances = x.lookupInScope("​distances"​) || x.lookupInScope("​result"​);​ var distances = x.lookupInScope("​distances"​) || x.lookupInScope("​result"​);​ - var sourceNode = x.lookupInScope("​source"​);​ + var sourceNode = x.lookupInScope("​source"​) ​|| nodes[0]; ​ ​ // Update nodes. // Update nodes. 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); }); });