commit/galaxy-central: jgoecks: Trackster: fix bugs to (a) clear reference track when changing chromosomes and (b) to only show differences if reference data is available.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/8d486ca45a22/ changeset: 8d486ca45a22 user: jgoecks date: 2012-01-26 15:02:33 summary: Trackster: fix bugs to (a) clear reference track when changing chromosomes and (b) to only show differences if reference data is available. affected #: 1 file diff -r a741ad5ebd910818153c0a4fdb4331bd76da834f -r 8d486ca45a224bf20cca622b0c0f06f72c98ef3c static/scripts/trackster.js --- a/static/scripts/trackster.js +++ b/static/scripts/trackster.js @@ -1549,6 +1549,7 @@ drawable.init(); } } + view.reference_track.init(); } if (low !== undefined && high !== undefined) { view.low = Math.max(low, 0); @@ -3876,8 +3877,9 @@ extend(ReferenceTrack.prototype, Drawable.prototype, TiledTrack.prototype, { build_header_div: function() {}, init: function() { + this.data_manager.clear(); // Enable by default because there should always be data when drawing track. - this.enabled = true; + this.enabled = true; }, can_draw: Drawable.prototype.can_draw, /** @@ -5444,9 +5446,15 @@ // TODO: this can be made much more efficient by computing the complete sequence // to draw and then drawing it. for (var c = 0, str_len = seq.length; c < str_len; c++) { - if (this.prefs.show_differences && this.ref_seq) { - var ref_char = this.ref_seq[seq_start - tile_low + c]; - if (!ref_char || ref_char.toLowerCase() === seq[c].toLowerCase()) { + if (this.prefs.show_differences) { + if (this.ref_seq) { + var ref_char = this.ref_seq[seq_start - tile_low + c]; + if (!ref_char || ref_char.toLowerCase() === seq[c].toLowerCase()) { + continue; + } + } + else { + // No reference so cannot show differences. continue; } } 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