commit/galaxy-central: jgoecks: Trackster: add mode parameter to draw_tile and use to support better overview drawing.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/52e6f9a13e34/ changeset: 52e6f9a13e34 user: jgoecks date: 2011-08-31 17:44:52 summary: Trackster: add mode parameter to draw_tile and use to support better overview drawing. affected #: 1 file (38 bytes) --- a/static/scripts/trackster.js Tue Aug 30 16:56:52 2011 -0400 +++ b/static/scripts/trackster.js Wed Aug 31 11:44:52 2011 -0400 @@ -2240,7 +2240,7 @@ // Draw tile if necessary. if (!tile) { - tile = track.draw_tile(overview_data, resolution, 0, w_scale); + tile = track.draw_tile(overview_data, "Auto", resolution, 0, w_scale); track.tile_cache.set(key, tile); } @@ -2395,7 +2395,7 @@ // If we can draw now, do so if ( can_draw_now ) { extend( tile_data, more_tile_data ); - var tile = track.draw_tile(tile_data, resolution, tile_index, w_scale, seq_data); + var tile = track.draw_tile(tile_data, track.mode, resolution, tile_index, w_scale, seq_data); track.tile_cache.set(key, tile); // Don't show if no tile if (tile !== undefined) { @@ -2558,7 +2558,7 @@ /** * Draw ReferenceTrack tile. */ - draw_tile: function(seq, resolution, tile_index, w_scale) { + draw_tile: function(seq, mode, resolution, tile_index, w_scale) { var track = this, tile_length = DENSITY * resolution; @@ -2696,7 +2696,7 @@ /** * Draw LineTrack tile. */ - draw_tile: function(result, resolution, tile_index, w_scale) { + draw_tile: function(result, mode, resolution, tile_index, w_scale) { if (this.vertical_range === undefined) { return; } @@ -2713,7 +2713,7 @@ // Paint line onto full canvas var ctx = canvas.getContext("2d"); - var painter = new painters.LinePainter(result.data, tile_low, tile_low + tile_length, this.prefs, this.mode); + var painter = new painters.LinePainter(result.data, tile_low, tile_low + tile_length, this.prefs, mode); painter.draw(ctx, width, height); return new Tile(tile_index, resolution, canvas, result.data); @@ -2968,18 +2968,18 @@ /** * Draw FeatureTrack tile. * @param result result from server + * @param mode mode to draw in * @param resolution view resolution * @param tile_index index of tile to be drawn * @param w_scale base pairs per pixel * @param ref_seq reference sequence data */ - draw_tile: function(result, resolution, tile_index, w_scale, ref_seq) { + draw_tile: function(result, mode, resolution, tile_index, w_scale, ref_seq) { var track = this, tile_low = tile_index * DENSITY * resolution, tile_high = (tile_index + 1) * DENSITY * resolution, tile_span = tile_high - tile_low, width = Math.ceil(tile_span * w_scale), - mode = this.mode, min_height = 25, left_offset = this.left_offset, slots, Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket