From e2b633fd166eec87d09df32a64f0bcf8568cd1c7 Mon Sep 17 00:00:00 2001 From: Kanwei Li Date: Tue, 12 Apr 2011 23:41:06 -0400 Subject: [PATCH] trackster: Don't load huge reference tracks now that we pre-load data, preventing hang --- static/scripts/trackster.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/scripts/trackster.js b/static/scripts/trackster.js index de31950de13..171f6fd92ce 100644 --- a/static/scripts/trackster.js +++ b/static/scripts/trackster.js @@ -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,