Skip to content

Commit

Permalink
make pos-labels centered over their gridline, and more compact
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuels committed Mar 1, 2012
1 parent 3f416f7 commit 75b211a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions genome.css
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ div.gridline {

div.pos-label {
position: absolute;
left: 0px;
background-color: #ddd;
left: -0.35em;
top: 0px;
z-index: 100;
padding: 4px;
margin: 1px;
font-family: sans-serif;
}

Expand Down
5 changes: 3 additions & 2 deletions js/StaticTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ StaticTrack.prototype.fillBlock = function(blockIndex, block,
leftBase, rightBase, scale,
padding, stripeWidth) {
var posLabel = document.createElement("div");
var numtext = Util.addCommas( leftBase );
posLabel.className = this.labelClass;
posLabel.appendChild(document.createTextNode(Util.addCommas(leftBase)));
posLabel.style.top = "0px";// y + "px";
posLabel.style.left = "-" + Number(numtext.length)/1.7 + "ex";
posLabel.appendChild( document.createTextNode( numtext ) );
block.appendChild(posLabel);
this.heightUpdate(this.posHeight, blockIndex);
};

0 comments on commit 75b211a

Please sign in to comment.