[Bioperl-guts-l] [14814] bioperl-live/trunk/Bio/Graphics/Panel.pm: fixed rotation of imagemaps, which was not correct
Lincoln Stein
lstein at dev.open-bio.org
Wed Aug 20 19:02:12 EDT 2008
Revision: 14814
Author: lstein
Date: 2008-08-20 19:02:12 -0400 (Wed, 20 Aug 2008)
Log Message:
-----------
fixed rotation of imagemaps, which was not correct
Modified Paths:
--------------
bioperl-live/trunk/Bio/Graphics/Panel.pm
Modified: bioperl-live/trunk/Bio/Graphics/Panel.pm
===================================================================
--- bioperl-live/trunk/Bio/Graphics/Panel.pm 2008-08-20 21:24:18 UTC (rev 14813)
+++ bioperl-live/trunk/Bio/Graphics/Panel.pm 2008-08-20 23:02:12 UTC (rev 14814)
@@ -624,6 +624,7 @@
my $pl = $self->pad_left;
my $pt = $self->pad_top;
+
my $between_key = $self->{key_style} eq 'between';
my $bottom_key = $self->{key_style} eq 'bottom';
my $empty_track_style = $self->empty_track_style;
@@ -637,19 +638,19 @@
or $empty_track_style eq 'key' && $bottom_key);
$offset += $keyheight if $draw_between;
my $height = $track->layout_height;
- my $boxes = $track->boxes($pl,$offset+$pt);
+ my $boxes = $track->boxes($pl,$offset+$pt);
$self->track_position($track,$offset);
push @boxes,@$boxes;
$offset += $track->layout_height + $self->spacing;
}
if ($rotate) {
- $offset -= $self->spacing;
- @boxes = map {
- @{$_}[1,2,3,4] = @{$_}[2,1,4,3];
- ($_->[1],$_->[3]) = map {$offset - $_} @{$_}[1,3];
- $_;
- } @boxes;
+ my $x_offset = $self->height-1;
+ @boxes = map {
+ @{$_}[1,2,3,4] = @{$_}[4,1,2,3];
+ ($_->[1],$_->[3]) = map {$x_offset - $_} @{$_}[1,3];
+ $_;
+ } @boxes;
}
$self->{boxes} = \@boxes;
return wantarray ? @boxes : \@boxes;
More information about the Bioperl-guts-l
mailing list