Skip to content

Commit

Permalink
fix minor display issues, add footer
Browse files Browse the repository at this point in the history
  • Loading branch information
osallou committed Dec 29, 2011
1 parent 4b78691 commit ab6f09b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 4 additions & 0 deletions css/uiblast.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
}

.header {
margin : 50px;
border-radius: 15px;
background-color: white;
padding: 20px;
Expand All @@ -31,6 +32,7 @@
background-position:right;
font-size: 2em;
font-weight: bold;
min-width: 1200px;
}


Expand All @@ -39,6 +41,8 @@ body {
}

.footer {
margin : 50px;
padding: 20px;
background-image:url("../img/food_030.jpg");
min-height: 120px;
min-width: 1200px;
Expand Down
7 changes: 3 additions & 4 deletions js/uiseqblast.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ function drawSelection(start,stop) {
*/
function drawSequences(min,max) {
clearCanvas();
clearSelectCanvas();
max = parseInt(max);
min = parseInt(min);

Expand Down Expand Up @@ -99,14 +100,15 @@ for (var i=0;i<sequences.length;i++)
maxseq = i;
}
}
var requiredWidth = xPos+Xseq+context.measureText(sequences[maxseq]["seq"]).width+50;
var requiredWidth = Math.min(xPos+Xseq+context.measureText(sequences[maxseq]["seq"]).width+50,xPos+Xseq+context.measureText(sequences[maxseq]["seq"].substring(0,500)).width+50);
$("#canvas-layers").height(requiredHeight);
$("#canvas-layers").width(requiredWidth);
document.getElementById("blastsequencecanvas").height = requiredHeight;
document.getElementById("blastselectcanvas").height = requiredHeight;
document.getElementById("blastsequencecanvas").width = requiredWidth;
document.getElementById("blastselectcanvas").width = requiredWidth;
clearCanvas();
clearSelectCanvas();
if($.getURLParam("debug")==1) {
console.log("required height: "+requiredHeight);
console.log("required width: "+requiredWidth);
Expand Down Expand Up @@ -310,9 +312,6 @@ $.ajax( {
if(feature["to"]<0) {
feature["to"]=0;
}
if(feature["from"]<0) {
feature["from"]=0;
}
feature["title"]= docs[doc]["feature"]+" "+docs[doc]["start"]+"-"+docs[doc]["end"];
feature["text"]= docs[doc]["attributes"];
feature["color"]="rgba("+Math.floor(Math.random() * 256 * 0.6)+","+Math.floor(Math.random() * 256 * 0.6)+","+Math.floor(Math.random() * 256 * 0.6)+",0.1)";
Expand Down
8 changes: 7 additions & 1 deletion sequence.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
<div id="zoomin">plus</div>
<div id="zoomout">minus</div>
-->
<div class="header">
GenOUEST Blast XML display
</div>

<div class="content">
<div id="blast" class="label"></div>
<div id="selector" class="selector">
Expand All @@ -77,7 +81,9 @@
<div id="canvas-layers" style="position:relative; width:3500px; height:100px">
<canvas id="blastsequencecanvas" width="3500" height="100"></canvas>
<canvas id="blastselectcanvas" width="3500" height="100"></canvas>
<div id="documentDetails"/>
</div>
</div>
<div id="documentDetails"/>
<div class="footer"></div>
</body>
</html>

0 comments on commit ab6f09b

Please sign in to comment.