change rankdir based on number of connected nodes

integration-tests
Josha von Gizycki 6 years ago
parent b0c7055fa1
commit 879345355e

@ -17,8 +17,13 @@
relationships-in (map (fn [{:keys [link source schema]}]
[(:uuid source) :> (:uuid instance)
{:label (:name link)}])
(:links-in instance))]
(-> [[(:uuid instance) {:label (:name instance)
(:links-in instance))
rankdir (if (or (> (count in-nodes) 7)
(> (count out-nodes) 7))
"LR"
"TD")]
(-> [{:rankdir rankdir}
[(:uuid instance) {:label (:name instance)
:shape "cylinder"}]]
(into out-nodes)
(into in-nodes)

Loading…
Cancel
Save