$('.node').children('title').filter( function(index) {
return $(this).text() == value;
}).siblings('ellipse').each( function( index ) {
- $(this).attr( {stroke:'black', fill:'#eee'} );
+ $(this).attr( {stroke:'black', fill:'#444'} );
});
});
jQuery.each( arr_node_ids, function(index,value) {
</head>
<body>
<h1>Stexaminer</h1>
+ <h2>[% text_title %]</h2>
<div id="svg_graph">
[% svg %]
</div>
<th><span class="rowid">[% row.id %]</span></th>
[% FOREACH reading IN row.readings -%]
[% SET cellclass = 'clickable conflict' IF reading.conflict -%]
-[% SET cellclass = 'clickable' IF reading.conflict -%]
+[% SET cellclass = 'clickable' IF !reading.conflict -%]
<td class="[% cellclass %]"><span onclick="$('td.active_variant_cell').removeClass('active_variant_cell');$(this).parent().addClass('active_variant_cell');$('tr.active_variant_row').removeClass('active_variant_row');$(this).parents('tr').addClass('active_variant_row');color_nodes($(this).parent().index(), [% reading.group %], [% reading.missing %]);">[% reading.text %]</span></td>
[% END -%]
[% FILTER repeat( row.empty ) -%]
my( $class, $args ) = @_;
my $self = {};
# Our object needs to have a stemma graph and a variant table.
- my( $svg, $variants ) = run_analysis( $args->{'file'}, $args->{'stemmadot'} );
+ my( $title, $svg, $variants ) = run_analysis( $args->{'file'}, $args->{'stemmadot'} );
$self->{'svg'} = $svg;
+ $self->{'title'} = $title;
$self->{'variants'} = $variants;
bless( $self, $class );
# For all the groups with more than one member, collect the list of all
# contiguous vertices needed to connect them.
# TODO: deal with a.c. reading logic
- my $conflict = analyze_variant_location(
- $group_readings, $groups, $stemma->apsp );
+ my $conflict = analyze_variant_location( $group_readings, $groups, $stemma->apsp );
$variant_row->{'genealogical'} = keys %$conflict ? undef : 1;
foreach my $grp ( sort keys %$group_readings ) {
my $rdg = $group_readings->{$grp};
- my $in_conflict = exists $conflict->{$grp};
+ my $in_conflict = exists $conflict->{$rdg};
push( @{$variant_row->{'readings'}},
{ 'text' => $rdg, 'group' => $grp, 'conflict' => $in_conflict,
'missing' => wit_stringify( $lacunose ) } );
$row->{'empty'} = $empty;
}
- return( $svg, $variants );
+ return( $tradition->name, $svg, $variants );
}
sub analyze_variant_location {