From 067f7e7f1ab1e2590af4f30e0fa90922c268ef47 Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Tue, 26 Sep 2017 16:25:45 -0400 Subject: [PATCH] nitweb: allow options in graph card Signed-off-by: Alexandre Terrasa --- src/web/api_docdown.nit | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/web/api_docdown.nit b/src/web/api_docdown.nit index 80c50c7..a5ca012 100644 --- 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 -- 1.7.9.5