Skip to content

Commit

Permalink
apply engine parameters at start; move rankdir to engine per warning
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonwoodhull committed Dec 20, 2018
1 parent a5e958c commit 96496f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/js/network-building.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ var node_flat = dc_graph.flat_group.make([], function(d) { return d.id; }),
edge_flat = dc_graph.flat_group.make([], function(d) { return d.id; });

var engine = dc_graph.spawn_engine(sync_url.vals.layout, sync_url.vals, sync_url.vals.worker);
apply_engine_parameters(engine);

drawDiagram
.width('auto')
.height('auto')
.restrictPan(true)
.layoutEngine(engine)
.rankdir(sync_url.vals.rankdir)
.transitionDuration(500)
.stageTransitions('insmod')
.showLayoutSteps(false)
Expand Down Expand Up @@ -70,6 +70,7 @@ function apply_engine_parameters(engine) {
break;
}
drawDiagram.initLayoutOnRedraw(engine.layoutAlgorithm() === 'cola');
engine.rankdir(sync_url.vals.rankdir);
return engine;
}

Expand Down

0 comments on commit 96496f2

Please sign in to comment.