commit/galaxy-central: jgoecks: Trackster: small fixes so that ReferenceTracks are compatible with changes in 09c6c980e463
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/501ef487e37f/ changeset: 501ef487e37f user: jgoecks date: 2011-12-14 21:25:03 summary: Trackster: small fixes so that ReferenceTracks are compatible with changes in 09c6c980e463 affected #: 1 file diff -r 0c804033ae5a766f1d12a2030b73fe306c27f660 -r 501ef487e37f0f6ff2e6def235f3878a88d0a7c0 static/scripts/trackster.js --- a/static/scripts/trackster.js +++ b/static/scripts/trackster.js @@ -3017,7 +3017,7 @@ var all_tiles_drawn = true; var drawn_tiles = []; var tile_count = 0; - var is_tile = function(o) { return ('track' in o) }; + var is_tile = function(o) { return (o && 'track' in o) }; // Draw or fetch and show tiles. while ( ( tile_index * DENSITY * resolution ) < high ) { var draw_result = this.draw_helper( force, width, tile_index, resolution, parent_element, w_scale ); @@ -3116,7 +3116,7 @@ tile_bounds = track._get_tile_bounds(tile_index, resolution), tile_low = tile_bounds[0], tile_high = tile_bounds[1], - width = Math.ceil( (tile_high - tile_low) * w_scale ), + width = Math.ceil( (tile_high - tile_low) * w_scale ) + track.left_offset, height = track.get_canvas_height(tile_data); canvas.width = width; @@ -3483,17 +3483,14 @@ * Draw ReferenceTrack tile. */ draw_tile: function(seq, canvas, mode, resolution, tile_index, w_scale) { - var track = this, - tile_length = DENSITY * resolution; + var track = this; if (w_scale > this.view.canvas_manager.char_width_px) { if (seq.data === null) { track.content_div.css("height", "0px"); return; } - var ctx = canvas.getContext("2d"); - canvas.width = Math.ceil(tile_length * w_scale + track.left_offset); - canvas.height = track.height_px; + var ctx = canvas.getContext("2d"); ctx.font = ctx.canvas.manager.default_font; ctx.textAlign = "center"; seq = seq.data; 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