nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
981cbfb
)
nitweb: allow options in graph card
author
Alexandre Terrasa
<alexandre@moz-code.org>
Tue, 26 Sep 2017 20:25:45 +0000
(16:25 -0400)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Thu, 28 Sep 2017 22:39:32 +0000
(18:39 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
src/web/api_docdown.nit
patch
|
blob
|
history
diff --git
a/src/web/api_docdown.nit
b/src/web/api_docdown.nit
index
80c50c7
..
a5ca012
100644
(file)
--- a/
src/web/api_docdown.nit
+++ b/
src/web/api_docdown.nit
@@
-317,7
+317,11
@@
redef class GraphCommand
var mentity = v.find_mentity(model, name)
if mentity == null then return
var g = new InheritanceGraph(mentity, model)
- v.add g.draw(3, 3).to_svg
+ var pdepth = if opts.has_key("pdepth") and opts["pdepth"].is_int then
+ opts["pdepth"].to_i else 3
+ var cdepth = if opts.has_key("cdepth") and opts["cdepth"].is_int then
+ opts["cdepth"].to_i else 3
+ v.add g.draw(pdepth, cdepth).to_svg
end
end