Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Fixes a bug where graph->svg doesn't accept options
Browse files Browse the repository at this point in the history
  • Loading branch information
scizo committed Jul 12, 2017
1 parent 0c0ecdd commit 8cad280
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rhizome/viz.clj
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ as a third argument."
:arglists (-> #'graph->dot meta :arglists)}
graph->svg
(comp dot->svg
(fn [nodes adjacent & opts]
(apply graph->dot nodes adjacent (apply concat (merge {:options {:dpi 72}} opts))))))
(fn [nodes adjacent & {:as opts}]
(let [final-opts (update-in opts [:options :dpi] #(if % % 72))]
(apply graph->dot nodes adjacent (apply concat final-opts))))))

(def
^{:doc "Takes a graph descriptor in the style of `graph->dot`, and displays a rendered image."
Expand Down

0 comments on commit 8cad280

Please sign in to comment.