Skip to content

Commit a334034

Browse files
committed
Set z-index of synteny highlights, sort Zmenus in reverse of rendering order
1 parent 542d305 commit a334034

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

htdocs/components/15_ImageMap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ Ensembl.Panel.ImageMap = Ensembl.Panel.Content.extend({
289289
$.each(this.coords, function (i) { c[rect[i]] = parseInt(this, 10); });
290290
}
291291

292-
panel.areas.push(c);
292+
panel.areas.unshift(c);
293293

294294
if (this.klass.drag || this.klass.vdrag) {
295295
// r = [ '#drag', image number, species number, species name, region, start, end, strand ]

modules/EnsEMBL/Draw/GlyphSet/Vsynteny.pm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,7 @@ sub draw_chromosome {
607607

608608
my %coords;
609609

610+
my $highlight_z_index = 1;
610611
foreach my $box (@$highlights) {
611612
my $vc_start = $box->{'start'} * $scale + $v_offset;
612613
my $vc_end = $box->{'end'} * $scale + $v_offset;
@@ -622,6 +623,7 @@ sub draw_chromosome {
622623
$self->push($self->Rect({
623624
'x' => $vc_start,
624625
'y' => $h_offset + $box->{'side'} * ($wid+4),
626+
'z' => $highlight_z_index,
625627
'width' => $vc_end - $vc_start,
626628
'height' => $wid,
627629
'colour' => $box->{'col'},
@@ -632,6 +634,7 @@ sub draw_chromosome {
632634
'href' => $box->{'href'},
633635
'zmenu' => $box->{'zmenu'}
634636
}));
637+
$highlight_z_index += 1;
635638

636639
if ($box->{'marked'}==1 || $box->{'marked'}==-1) {
637640
$self->push($self->Rect({

0 commit comments

Comments
 (0)