Merge: android: update compiler to use the "new" toolchain
[nit.git] / src / web / api_graph.nit
index 851da48..33ff7f8 100644 (file)
@@ -31,14 +31,11 @@ class APIInheritanceGraph
        super APIHandler
 
        redef fun get(req, res) do
+               var mentity = mentity_from_uri(req, res)
+               if mentity == null then return
                var pdepth = req.int_arg("pdepth")
                var cdepth = req.int_arg("cdepth")
-               var mentity = mentity_from_uri(req, res)
-               if mentity == null then
-                       res.error 404
-                       return
-               end
-               var g = new InheritanceGraph(mentity, view)
+               var g = new InheritanceGraph(mentity, config.view)
                res.send g.draw(pdepth, cdepth).to_svg
        end
 end
@@ -49,6 +46,8 @@ end
 class InheritanceGraph
        super ModelVisitor
 
+       autoinit center, view, filter
+
        # MEntity at the center of this graph
        var center: MEntity