add nocalc option for debug svg output
Tara L Andrews [Tue, 17 Apr 2012 11:20:58 +0000 (13:20 +0200)]
lib/Text/Tradition/Collation.pm

index 6357a6f..786e862 100644 (file)
@@ -550,7 +550,7 @@ sub as_svg {
     throw( "Need GraphViz installed to output SVG" )
        unless File::Which::which( 'dot' );
     my $want_subgraph = exists $opts->{'from'} || exists $opts->{'to'};
-    $self->calculate_ranks() unless $self->_graphcalc_done;
+    $self->calculate_ranks() unless( $self->_graphcalc_done || $opts->{'nocalc'} );
     if( !$self->has_cached_svg || $opts->{'recalc'}    || $want_subgraph ) {        
                my @cmd = qw/dot -Tsvg/;
                my( $svg, $err );