commit/galaxy-central: jgoecks: Create and use ReferenceTrackDataManager to fetch ReferenceTrack data.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/b20ed3ccbba2/ changeset: r5390:b20ed3ccbba2 user: jgoecks date: 2011-04-14 20:34:39 summary: Create and use ReferenceTrackDataManager to fetch ReferenceTrack data. affected #: 1 file (383 bytes) --- a/static/scripts/trackster.js Thu Apr 14 14:29:32 2011 -0400 +++ b/static/scripts/trackster.js Thu Apr 14 14:34:39 2011 -0400 @@ -244,11 +244,6 @@ * Load data from server; returns AJAX object so that use of Deferred is possible. */ load_data: function(chrom, low, high, mode, resolution, extra_params) { - if (this.track.track_type == "ReferenceTrack" && resolution > 1) { - // Now that data is pre-fetched before draw, we don't load reference tracks - // unless it's at the bottom level - return; - } // Setup data request params. var params = {"chrom": chrom, "low": low, "high": high, "mode": mode, "resolution": resolution, "dataset_id" : this.track.dataset_id, @@ -346,6 +341,20 @@ } }); +var ReferenceTrackDataManager = function(num_elements, track, subset) { + DataManager.call(this, num_elements, track, subset); +}; +extend(ReferenceTrackDataManager.prototype, DataManager.prototype, Cache.prototype, { + load_data: function(chrom, low, high, mode, resolution, extra_params) { + if (resolution > 1) { + // Now that data is pre-fetched before draw, we don't load reference tracks + // unless it's at the bottom level + return; + } + return DataManager.prototype.load_data.call(this, chrom, low, high, mode, resolution, extra_params); + } +}); + /** * View object manages complete viz view, including tracks and user interactions. */ @@ -1979,7 +1988,7 @@ this.content_div.css("border", "none"); this.data_url = reference_url; this.data_url_extra_params = {dbkey: view.dbkey}; - this.data_cache = new DataManager(CACHED_DATA, this, false); + this.data_cache = new ReferenceTrackDataManager(CACHED_DATA, this, false); this.tile_cache = new Cache(CACHED_TILES_LINE); }; extend(ReferenceTrack.prototype, TiledTrack.prototype, { 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