Skip to content

Commit

Permalink
attempt to clip overly long feature names
Browse files Browse the repository at this point in the history
  • Loading branch information
lstein committed Aug 29, 2012
1 parent 2676b70 commit 4e0757d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion install_util/GBrowseInstall.pm
Expand Up @@ -566,7 +566,7 @@ sub process_conf_files {
sub check_installed {
my $self = shift;
my ($install_path,$blib_file) = @_;
my $skip = $self->{skip} ||= IO::File->new('>>INSTALL.SKIP');
my $skip = $self->{skip} ||= IO::File->new('>>INSTALL.SKIP') or die "INSTALL.SKIP: $!";
(my $base = $blib_file) =~ s!^[^/]+/!!;
my $staged = File::Spec->catfile('./blib',$blib_file);
my $installed = File::Spec->catfile($install_path,$base);
Expand Down
4 changes: 3 additions & 1 deletion lib/Bio/Graphics/Browser2/RenderPanels.pm
Expand Up @@ -28,6 +28,7 @@ use constant RULER_INTERVALS => 20;
use constant PAD_OVERVIEW_BOTTOM => 5;
use constant TRY_CACHING_CONFIG => 1;
use constant MAX_PROCESSES => 4;
use constant MAX_TITLE_LEN => 40;

# when we load, we set a global indicating the LWP::UserAgent is available
my $LPU_AVAILABLE;
Expand Down Expand Up @@ -632,7 +633,7 @@ sub wrap_rendered_track {
$self->select_features_menu($label,\$title);

my $clipped_title = $title;
$clipped_title = substr($clipped_title,0,37).'...' if length($clipped_title) > 40;
$clipped_title = substr($clipped_title,0,MAX_TITLE_LEN-3).'...' if length($clipped_title) > MAX_TITLE_LEN;

my $titlebar =
span(
Expand Down Expand Up @@ -1560,6 +1561,7 @@ sub run_local_requests {

$titles = $panel->key_boxes;
foreach (@$titles) {
$_->[0] = substr($_->[0],0,MAX_TITLE_LEN-3).'...' if length($_->[0])>MAX_TITLE_LEN;
my $index = $_->[5]->bgcolor; # record track config bgcolor
my ($r,$g,$b) = $gd->rgb($index);
my $alpha = 1;
Expand Down

0 comments on commit 4e0757d

Please sign in to comment.