Skip to content

Commit

Permalink
Only draw topics with ids under 10000
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiemccarthy committed Nov 21, 2004
1 parent bb04e18 commit 561e962
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions plugins/Admin/topic_tree_draw.pl
Expand Up @@ -65,7 +65,11 @@
my $mpt = $constants->{mainpage_nexus_tid} || 1;

# Tell GraphViz what it needs to know.
for my $tid (keys %$tree) {
my @tids_to_draw =
sort { $a <=> $b }
grep { $_ < 10000 }
keys %$tree;
for my $tid (@tids_to_draw) {
my $topic = $tree->{$tid};
my $color;
if ($tid == $mpt) {
Expand All @@ -80,7 +84,11 @@
style => "filled",
shape => $shape,
);
for my $ctid ( @{$topic->{children}} ) {
my @children_to_include =
sort { $a <=> $b }
grep { $_ < 10000 }
@{$topic->{children}};
for my $ctid ( @children_to_include ) {
$g->add_edge($tid, $ctid,
style => $topic->{child}{$ctid} >= 30 ? "dashed" : "solid",
color => $hsv[ ($tid+$ctid) % @hsv ],
Expand Down

0 comments on commit 561e962

Please sign in to comment.