X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FSet%2FChain.pm;h=722815aa309625d0b0beed1a8bcd7f83189d4706;hb=5d8e597c1d1be20b1098403e6bbb80d70e7fe566;hp=d1022f842d4527513b3b9745a6a83b8d233f7bdf;hpb=7f9973057cc57660599aa4a093718cf343a48198;p=perl%2Fmodules%2FLaTeX-TikZ.git diff --git a/lib/LaTeX/TikZ/Set/Chain.pm b/lib/LaTeX/TikZ/Set/Chain.pm index d1022f8..722815a 100644 --- a/lib/LaTeX/TikZ/Set/Chain.pm +++ b/lib/LaTeX/TikZ/Set/Chain.pm @@ -69,7 +69,7 @@ sub kids { @{$_[0]->_kids} } =head2 C A code reference that describes how two successive elements of the chain are linked. -When the L method is , the connector is run repeatedly with these arguments : +When the L method is called, the connector is run repeatedly with these arguments : =over 4 @@ -152,7 +152,7 @@ sub add { =cut sub path { - my ($set, $tikz) = @_; + my $set = shift; my @kids = $set->kids; return '' unless @kids; @@ -160,7 +160,7 @@ sub path { my $conn = $set->connector; my $prev = $kids[0]; - my $path = $prev->path($tikz); + my $path = $prev->path(@_); if ($set->cycle) { push @kids, LaTeX::TikZ::Set::Raw->new( @@ -168,13 +168,14 @@ sub path { ); } + my $tikz = $_[0]; for my $i (1 .. $#kids) { my $next = $kids[$i]; my $link = $set->$conn($i - 1, $prev, $next, $tikz); confess('Invalid connector') unless defined $link and not blessed $link; $link = " $link "; $link =~ s/\s+/ /g; - $path .= $link . $next->path($tikz); + $path .= $link . $next->path(@_); $prev = $next; }