details: http://www.bx.psu.edu/hg/galaxy/rev/fabb2f6abc45 changeset: 2928:fabb2f6abc45 user: James Taylor <james@jamestaylor.org> date: Wed Oct 28 15:09:05 2009 -0400 description: Specify color for feature tracks in one place (eventually should be configurable) diffstat: static/scripts/trackster.js | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diffs (51 lines): diff -r edb48f2816b5 -r fabb2f6abc45 static/scripts/trackster.js --- a/static/scripts/trackster.js Tue Oct 27 22:34:30 2009 -0400 +++ b/static/scripts/trackster.js Wed Oct 28 15:09:05 2009 -0400 @@ -240,10 +240,10 @@ var min_label = $("<div class='yaxislabel'>" + track.min_value + "</div>"); var max_label = $("<div class='yaxislabel'>" + track.max_value + "</div>"); - max_label.css({ position: "relative", top: "20px" }); + max_label.css({ position: "relative", top: "35px" }); max_label.prependTo(track.container_div) - min_label.css({ position: "relative", top: track.height_px + 50 + "px", }); + min_label.css({ position: "relative", top: track.height_px + 32 + "px", }); min_label.prependTo(track.container_div); track.draw(); @@ -324,6 +324,7 @@ this.show_labels_scale = 0.001; this.showing_labels = false; this.vertical_gap = 10; + this.base_color = "#2C3143"; }; $.extend( FeatureTrack.prototype, TiledTrack.prototype, { init: function() { @@ -427,7 +428,7 @@ new_canvas.get(0).height = height; // console.log(( tile_low - this.view.low ) * w_scale, tile_index, w_scale); var ctx = new_canvas.get(0).getContext("2d"); - ctx.fillStyle = "#000"; + ctx.fillStyle = this.base_color; ctx.font = "10px monospace"; ctx.textAlign = "right"; @@ -462,7 +463,7 @@ ctx.fillStyle = LEFT_STRAND; } ctx.fillRect(f_start, y_center, f_end - f_start, 10); - ctx.fillStyle = "#000"; + ctx.fillStyle = this.base_color; } for (var k = 0, k_len = blocks.length; k < k_len; k++) { @@ -497,7 +498,7 @@ ctx.fillStyle = LEFT_STRAND_INV; } ctx.fillRect(f_start, y_center, f_end - f_start, 10); - ctx.fillStyle = "#000"; + ctx.fillStyle = this.base_color; } } }