| 1 | package Bio::Graphics::Glyph::point_glyph; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use base qw(Bio::Graphics::Glyph::generic); | ||
| 5 | |||
| 6 | sub box { | ||
| 7 | my $self = shift; | ||
| 8 | my @result = $self->SUPER::box(); | ||
| 9 | return @result unless $self->option('point') && $result[2]-$result[0] < 3; | ||
| 10 | my $h = $self->option('height')/2; | ||
| 11 | my $mid = int(($result[2]+$result[0])/2); | ||
| 12 | $result[0] = $mid-$h-1; # fudge a little to make it easier to click on | ||
| 13 | $result[2] = $mid+$h+1; | ||
| 14 | return @result; | ||
| 15 | } | ||
| 16 | |||
| 17 | 1; |