Permalink
Browse files

+ Graph should render a pdf if rendering a png will be prohibitive (n…

…ode+edge > 500)

[git-p4: depot-paths = "//src/graph/dev/": change = 7007]
  • Loading branch information...
1 parent 11162f2 commit 95193979c48ab52344fe398be476598142f6dd32 @zenspider zenspider committed Feb 6, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 bin/graph
View
@@ -21,6 +21,9 @@ klass = Object.const_get name
analyzer = klass.new
graph = analyzer.run
-graph.save name, $d ? nil : "png"
+huge = graph.nodes.size + graph.edges.size > 500
+ext = $d ? nil : huge ? "pdf" : "png"
-system "open #{name}.#{$d ? "dot" : "png"}" if $o
+graph.save name, ext
+
+system "open #{name}.#{ext || "dot"}" if $o

0 comments on commit 9519397

Please sign in to comment.