- next if $elem->{ 'type' } eq 'text';
- next if $elem->{ 'type' } eq 'wiggle';
-
- #$elem->{ 'strand' } = '+' if $elem->{ 'strand' } eq '+';
-
- $cookie->{ 'Q_ID' } = $elem->{ 'q_id' };
- $cookie->{ 'S_BEG' } = $elem->{ 's_beg' };
- $cookie->{ 'S_END' } = $elem->{ 's_end' };
- $cookie->{ 'STRAND' } = $elem->{ 'strand' };
-
- push @img, Maasha::XHTML::area(
- href => join( "&", "$cookie->{ 'SCRIPT' }?page=export",
- "session_id=$cookie->{ 'SESSION_ID' }",
- "user=$cookie->{ 'USER' }",
- "clade=$cookie->{ 'CLADE' }",
- "genome=$cookie->{ 'GENOME' }",
- "contig=$cookie->{ 'CONTIG' }",
- "assembly=$cookie->{ 'ASSEMBLY' }",
- "s_beg=$cookie->{ 'S_BEG' }",
- "s_end=$cookie->{ 'S_END' }",
- "strand=$cookie->{ 'STRAND' }",
- ),
- shape => 'rect',
- coords => "$elem->{ x1 }, $elem->{ y1 }, $elem->{ x2 }, $elem->{ y2 }",
- title => "$elem->{ 'title' }",
- );
+ next if $elem->{ 'type' } =~ /grid|text|wiggle/;
+
+ if ( $elem->{ 'type' } eq 'track_name' )
+ {
+ $x1 = $elem->{ 'x1' };
+ $y1 = $elem->{ 'y1' } - 10;
+ $x2 = $elem->{ 'x1' } + 6 * length $elem->{ 'txt' };
+ $y2 = $elem->{ 'y1' };
+
+ if ( Maasha::BGB::Track::track_hide( $cookie, $elem->{ 'track' } ) )
+ {
+ push @img, Maasha::XHTML::area(
+ href => join( "&", "$cookie->{ 'SCRIPT' }?page=browse",
+ "session_id=$cookie->{ 'SESSION_ID' }",
+ "user=$cookie->{ 'USER' }",
+ "clade=$cookie->{ 'CLADE' }",
+ "genome=$cookie->{ 'GENOME' }",
+ "assembly=$cookie->{ 'ASSEMBLY' }",
+ "contig=$cookie->{ 'CONTIG' }",
+ "track=$elem->{ 'track' }",
+ ),
+ shape => 'rect',
+ coords => "$x1, $y1, $x2, $y2",
+ title => qq(Show track: $elem->{ 'txt' }),
+ );
+ }
+ else
+ {
+ push @img, Maasha::XHTML::area(
+ href => join( "&", "$cookie->{ 'SCRIPT' }?page=browse",
+ "session_id=$cookie->{ 'SESSION_ID' }",
+ "user=$cookie->{ 'USER' }",
+ "clade=$cookie->{ 'CLADE' }",
+ "genome=$cookie->{ 'GENOME' }",
+ "assembly=$cookie->{ 'ASSEMBLY' }",
+ "contig=$cookie->{ 'CONTIG' }",
+ "track=$elem->{ 'track' }",
+ ),
+ shape => 'rect',
+ coords => "$x1, $y1, $x2, $y2",
+ title => qq(Hide track: $elem->{ 'txt' }),
+ );
+ }
+ }
+ else
+ {
+ push @img, Maasha::XHTML::area(
+ href => join( "&", "$cookie->{ 'SCRIPT' }?page=export",
+ "session_id=$cookie->{ 'SESSION_ID' }",
+ "user=$cookie->{ 'USER' }",
+ "clade=$cookie->{ 'CLADE' }",
+ "genome=$cookie->{ 'GENOME' }",
+ "assembly=$cookie->{ 'ASSEMBLY' }",
+ "contig=$cookie->{ 'CONTIG' }",
+ "s_beg=$elem->{ 's_beg' }",
+ "s_end=$elem->{ 's_end' }",
+ "strand=$elem->{ 'strand' }",
+ "q_id=$elem->{ 'q_id' }",
+ ),
+ shape => 'rect',
+ coords => "$elem->{ x1 }, $elem->{ y1 }, $elem->{ x2 }, $elem->{ y2 }",
+ title => "$elem->{ 'title' }",
+ );
+ }