commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/a3909b1eebdc/ Changeset: a3909b1eebdc Branch: next-stable User: jgoecks Date: 2013-05-22 20:47:37 Summary: Trackster: fix for subsetting variant tracks. Affected #: 2 files diff -r 1b279375e33d1139b60f8e13c4b1de8a0c27b438 -r a3909b1eebdc7b34fb16b5276464892431528177 static/scripts/viz/trackster/tracks.js --- a/static/scripts/viz/trackster/tracks.js +++ b/static/scripts/viz/trackster/tracks.js @@ -3139,6 +3139,11 @@ var tile_drawn = $.Deferred(); track.tile_cache.set_elt(key, tile_drawn); $.when.apply($, get_tile_data()).then( function() { + // If deferred objects ever show up in tile data, that is likely because a + // Deferred-subsetting interaction failed. Specifically, a Deferred for a superset + // was returned but then couldn't be used). It's not clear whether this will happen + // in practice, and currently the code doesn't handle it. It could probably handle it + // by recursively calling draw_helper. var tile_data = get_tile_data(), tracks_data = tile_data, seq_data; @@ -3313,10 +3318,15 @@ }, /** - * Returns true if data can be subsetted. Defaults to false to ensure data is fetched when needed. + * Returns true if data can be subsetted. */ can_subset: function(data) { - return false; + // Do not subset entries with a message or data with no detail. + if (data.dataset_type === 'bigwig' || data.message || data.extra_info === "no_detail") { + return false; + } + + return true; }, /** @@ -4116,18 +4126,6 @@ else { return true; } - }, - - /** - * Returns true if data can be subsetted. - */ - can_subset: function(data) { - // Do not subset entries with a message or data with no detail. - if (data.dataset_type === 'bigwig' || data.message || data.extra_info === "no_detail") { - return false; - } - - return true; } }); diff -r 1b279375e33d1139b60f8e13c4b1de8a0c27b438 -r a3909b1eebdc7b34fb16b5276464892431528177 static/scripts/viz/visualization.js --- a/static/scripts/viz/visualization.js +++ b/static/scripts/viz/visualization.js @@ -68,7 +68,7 @@ * Helper to determine if object is jQuery deferred. */ var is_deferred = function ( d ) { - return ( 'isResolved' in d ); + return ('promise' in d); }; // --------- Models --------- @@ -331,14 +331,6 @@ * Get data from dataset. */ get_data: function(region, mode, resolution, extra_params) { - // Debugging: - //console.log("get_data", low, high, mode); - /* - console.log("cache contents:") - for (var i = 0; i < this.key_ary.length; i++) { - console.log("\t", this.key_ary[i], this.obj_cache[this.key_ary[i]]); - } - */ // Look for entry and return if it's a deferred or if data available is compatible with mode. var entry = this.get_elt(region); @@ -348,8 +340,7 @@ } // - // Look in cache for data that can be used. Data can be reused if it - // has the requested data and is not summary tree and has details. + // Look in cache for data that can be used. // TODO: this logic could be improved if the visualization knew whether // the data was "index" or "data." // https://bitbucket.org/galaxy/galaxy-central/commits/ff27d341f6e9/ Changeset: ff27d341f6e9 User: jgoecks Date: 2013-05-22 20:48:02 Summary: Merge in next-stable Affected #: 2 files diff -r 921ad3745ba304aed12b0d3425cf9c6f9b727f7c -r ff27d341f6e9f7efe80f5af66fd7a811f77b2501 static/scripts/viz/trackster/tracks.js --- a/static/scripts/viz/trackster/tracks.js +++ b/static/scripts/viz/trackster/tracks.js @@ -3139,6 +3139,11 @@ var tile_drawn = $.Deferred(); track.tile_cache.set_elt(key, tile_drawn); $.when.apply($, get_tile_data()).then( function() { + // If deferred objects ever show up in tile data, that is likely because a + // Deferred-subsetting interaction failed. Specifically, a Deferred for a superset + // was returned but then couldn't be used). It's not clear whether this will happen + // in practice, and currently the code doesn't handle it. It could probably handle it + // by recursively calling draw_helper. var tile_data = get_tile_data(), tracks_data = tile_data, seq_data; @@ -3313,10 +3318,15 @@ }, /** - * Returns true if data can be subsetted. Defaults to false to ensure data is fetched when needed. + * Returns true if data can be subsetted. */ can_subset: function(data) { - return false; + // Do not subset entries with a message or data with no detail. + if (data.dataset_type === 'bigwig' || data.message || data.extra_info === "no_detail") { + return false; + } + + return true; }, /** @@ -4116,18 +4126,6 @@ else { return true; } - }, - - /** - * Returns true if data can be subsetted. - */ - can_subset: function(data) { - // Do not subset entries with a message or data with no detail. - if (data.dataset_type === 'bigwig' || data.message || data.extra_info === "no_detail") { - return false; - } - - return true; } }); diff -r 921ad3745ba304aed12b0d3425cf9c6f9b727f7c -r ff27d341f6e9f7efe80f5af66fd7a811f77b2501 static/scripts/viz/visualization.js --- a/static/scripts/viz/visualization.js +++ b/static/scripts/viz/visualization.js @@ -68,7 +68,7 @@ * Helper to determine if object is jQuery deferred. */ var is_deferred = function ( d ) { - return ( 'isResolved' in d ); + return ('promise' in d); }; // --------- Models --------- @@ -331,14 +331,6 @@ * Get data from dataset. */ get_data: function(region, mode, resolution, extra_params) { - // Debugging: - //console.log("get_data", low, high, mode); - /* - console.log("cache contents:") - for (var i = 0; i < this.key_ary.length; i++) { - console.log("\t", this.key_ary[i], this.obj_cache[this.key_ary[i]]); - } - */ // Look for entry and return if it's a deferred or if data available is compatible with mode. var entry = this.get_elt(region); @@ -348,8 +340,7 @@ } // - // Look in cache for data that can be used. Data can be reused if it - // has the requested data and is not summary tree and has details. + // Look in cache for data that can be used. // TODO: this logic could be improved if the visualization knew whether // the data was "index" or "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)
-
commits-noreply@bitbucket.org