Skip to content

Commit 85db98f

Browse files
committed
Bugfix for gene name position in scatterchart
1 parent f82391a commit 85db98f

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/main/java/at/gmi/nordborglab/widgets/gwasgeneviewer/client/GWASGeneViewer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ public void onUnderlay(UnderlayEvent event) {
302302
double x = Math.round(left)+3;
303303
if (x+60 > scatterChart.getOffsetWidth())
304304
x = x - 60;
305-
int y = scatterChart.getAbsoluteTop() - scatterChart.getOffsetHeight() + 8;
306-
geneLabel.setAttribute("style", "position: absolute; font-size: 11px; z-index: 10; color: "+color+"; line-height: normal; overflow-x: hidden; overflow-y: hidden; top: "+y+"px; left: "+x+"px; text-align: right;");
305+
int y = 2;
306+
geneLabel.setAttribute("style", "position: absolute; font-size: 11px; z-index: 10; color: "+color+"; line-height: normal; overflow-x: hidden; overflow-y: hidden; top: "+y+"px; left: "+x+"px; text-align: right; width:60px");
307307
if (DOM.getElementById(geneLabel.getId()) == null)
308308
scatterChart.getElement().appendChild(geneLabel);
309309
}

src/main/java/at/gmi/nordborglab/widgets/gwasgeneviewer/client/GWASGeneViewer.ui.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@
66
<ui:style>
77
.genomeView {
88
margin: 0px 5px 0px 0px;
9-
}
9+
}
10+
.container {
11+
position:relative;
12+
}
13+
14+
1015
</ui:style>
11-
<g:FlowPanel height="100%" width="100%" >
16+
<g:FlowPanel height="100%" width="100%" addStyleNames="{style.container}">
1217
<g:HTMLPanel>
1318
<g:Label horizontalAlignment="ALIGN_LEFT" ui:field="chromosome_label"/>
1419
</g:HTMLPanel>

0 commit comments

Comments
 (0)