Skip to content

Commit a975a96

Browse files
committed
Merge pull request algorithm-visualizer#72 from TornjV/fix/tree
Change tree orientation
2 parents ff73247 + a959d26 commit a975a96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/module/directed_graph.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ DirectedGraphTracer.prototype = $.extend(true, Object.create(Tracer.prototype),
111111

112112
var wgap = 1 / (maxDepth - 1);
113113
var dfs = function (node, depth, top, bottom) {
114-
place(node, depth * wgap, (top + bottom) / 2);
114+
place(node, top + bottom, depth * wgap);
115115
var children = 0;
116116
for (var i = 0; i < G[node].length; i++) {
117117
if (G[node][i]) children++;

0 commit comments

Comments
 (0)