File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 45
45
[mentions-data]
46
46
(let [mentions #(rad/get-mentions mentions-data %)
47
47
weights (rad/weights
48
- (into #{} (mapcat mentions (keys mentions-data)))
48
+ (into ( set ( roots mentions-data)) (mapcat mentions (keys mentions-data)))
49
49
mentions)]
50
50
{:mentions mentions-data
51
51
:locs (-> (rad/layout (roots mentions-data) weights mentions)
Original file line number Diff line number Diff line change 55
55
(layout nodes weight-fn child-fn 1 0 360 #{}))
56
56
([nodes weight-fn child-fn radius a1 a2 seen]
57
57
(let [slice (- a2 a1)
58
- total-weight (reduce + (map weight-fn nodes))
58
+ total-weight (reduce + (map #(or (weight-fn %)
59
+ (throw (str " No weight for " %))) nodes))
59
60
seen (into seen nodes)]
60
61
(loop [m {}
61
62
c1 a1
You can’t perform that action at this time.
0 commit comments