From: Ken Youens-Clark Date: Mon, 30 Aug 2004 19:04:59 +0000 (+0000) Subject: Allow "gutter" to be set by producer arg (Markus Törnqvis). X-Git-Tag: v0.06~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=01a182ab08d3403ba386620669af95685b96c551;p=dbsrgits%2FSQL-Translator.git Allow "gutter" to be set by producer arg (Markus Törnqvis). --- diff --git a/lib/SQL/Translator/Producer/Diagram.pm b/lib/SQL/Translator/Producer/Diagram.pm index c23633b..076bb82 100644 --- a/lib/SQL/Translator/Producer/Diagram.pm +++ b/lib/SQL/Translator/Producer/Diagram.pm @@ -1,7 +1,7 @@ package SQL::Translator::Producer::Diagram; # ------------------------------------------------------------------- -# $Id: Diagram.pm,v 1.11 2004-03-04 14:39:15 dlc Exp $ +# $Id: Diagram.pm,v 1.12 2004-08-30 19:04:59 kycl4rk Exp $ # ------------------------------------------------------------------- # Copyright (C) 2002-4 SQLFairy Authors # @@ -42,7 +42,7 @@ use SQL::Translator::Schema::Constants; use SQL::Translator::Utils qw(debug); use vars qw[ $VERSION $DEBUG ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.11 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.12 $ =~ /(\d+)\.(\d+)/; $DEBUG = 0 unless defined $DEBUG; use constant VALID_FONT_SIZE => { @@ -71,6 +71,7 @@ sub produce { my $font_size = $args->{'font_size'} || 'medium'; my $imap_file = $args->{'imap_file'} || ''; my $imap_url = $args->{'imap_url'} || ''; + my $gutter = $args->{'gutter'} || 30; # distance b/w columns my $no_columns = $args->{'no_columns'}; my $no_lines = $args->{'no_lines'}; my $add_color = $args->{'add_color'}; @@ -111,7 +112,6 @@ sub produce { my $cur_col = 1; # the current column my $no_this_col = 0; # number of tables in current column my $this_col_x = $x; # current column's x - my $gutter = 30; # distance b/w columns my %nj_registry; # for locations of fields for natural joins my @fk_registry; # for locations of fields for foreign keys my %table_x; # for max x of each table