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
Last revision Both sides next revision
algorithm:dijkstras [2016/06/11 15:15]
will Working viz
algorithm:dijkstras [2016/06/11 15:26]
will Always highlight source node.
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.
algorithm/dijkstras.txt · Last modified: 2016/06/28 22:59 by will