trackster: Don't load huge reference tracks now that we pre-load data, preventing hang

This commit is contained in:
Kanwei Li
2011-04-12 23:41:06 -04:00
parent 962f7d06ba
commit e2b633fd16
+5
View File
@@ -244,6 +244,11 @@ extend(DataManager.prototype, Cache.prototype, {
* 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,