diff options
author | Yorhel <git@yorhel.nl> | 2020-03-31 12:59:43 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-03-31 12:59:58 +0200 |
commit | 86d4be655bcae2874f0661b3a35cdfd2a448530c (patch) | |
tree | 5b564e88b3aa8832c79d3b478d8806598f158d07 | |
parent | 99cbd961fd00e8ba225c9ba4a723d4592363b5ea (diff) |
Producers::Graph: Add ugly hack to grow the #mainbox for large graphs
This makes the #mainbox a bit wider even in the normal case where the
graph does fit, but that's just a minor glitch.
-rw-r--r-- | lib/VNWeb/Producers/Graph.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/VNWeb/Producers/Graph.pm b/lib/VNWeb/Producers/Graph.pm index 9dc44248..8a5972c6 100644 --- a/lib/VNWeb/Producers/Graph.pm +++ b/lib/VNWeb/Producers/Graph.pm @@ -138,10 +138,11 @@ TUWF::get qr{/$RE{pid}/rg}, sub { framework_ title => "Relations for $p->{name}", type => 'p', dbobj => $p, tab => 'rg', sub { - div_ class => 'mainbox', sub { + div_ class => 'mainbox', style => 'float: left; min-width: 100%', sub { h1_ "Relations for $p->{name}"; p_ sub { txt_ sprintf "Displaying %d out of %d related producers.", $visible_nodes, $total_nodes; + debug_ +{ nodes => $nodes, rel => $rel }; br_; txt_ "Adjust graph size: "; join_ ', ', sub { @@ -154,8 +155,8 @@ TUWF::get qr{/$RE{pid}/rg}, sub { txt_ '.'; } if $total_nodes > 10; p_ class => 'center', sub { lit_ dot2svg gen_dot $rel, $nodes, $num == 15 ? '' : "?num=$num" }; - debug_ +{ nodes => $nodes, rel => $rel }; - } + }; + clearfloat_; }; }; |