commit/galaxy-central: 3 new changesets

3 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/49305f493a90/ Changeset: 49305f493a90 User: jgoecks Date: 2013-04-19 17:01:43 Summary: Automated merge. Affected #: 1 file diff -r 6f3b665ace6b76e02ac0a5651801667cca0f50b9 -r 49305f493a907e8fbb58c2a9c57c3e3565ed9ee8 static/scripts/viz/trackster/tracks.js --- a/static/scripts/viz/trackster/tracks.js +++ b/static/scripts/viz/trackster/tracks.js @@ -3293,20 +3293,25 @@ } } ].concat(TiledTrack.prototype.action_icons_def), + // HACK: CompositeTrack should inherit from DrawableCollection as well. /** * Returns representation of object in a dictionary for easy saving. * Use from_dict to recreate object. */ to_dict: DrawableCollection.prototype.to_dict, + add_drawable: DrawableCollection.prototype.add_drawable, + unpack_drawables: DrawableCollection.prototype.unpack_drawables, + change_mode: function(new_mode) { TiledTrack.prototype.change_mode.call(this, new_mode); for (var i = 0; i < this.drawables.length; i++) { this.drawables[i].change_mode(new_mode); } }, + /** * Initialize component tracks and draw composite track when all components are initialized. */ @@ -3324,13 +3329,16 @@ track.request_draw(); }); }, + update_icons: function() { // For now, hide filters and tool. this.action_icons.filters_icon.hide(); this.action_icons.tools_icon.hide(); this.action_icons.param_space_viz_icon.hide(); }, + can_draw: Drawable.prototype.can_draw, + draw_helper: function(force, region, resolution, parent_element, w_scale, kwargs) { // FIXME: this function is similar to TiledTrack.draw_helper -- can the two be merged/refactored? var track = this, @@ -3443,6 +3451,7 @@ // Returned Deferred that is resolved when tile can be drawn. return can_draw; }, + /** * Replace this track with group that includes individual tracks. */ @@ -3464,6 +3473,7 @@ var index = this.container.replace_drawable(this, group, true); group.request_draw(); }, + /** * Actions taken before drawing a tile. */ @@ -3496,6 +3506,7 @@ track.prefs.max_value = max; } }, + /** * Actions to be taken after draw has been completed. Draw is completed when all tiles have been * drawn/fetched and shown. https://bitbucket.org/galaxy/galaxy-central/commits/6f3b665ace6b/ Changeset: 6f3b665ace6b User: jgoecks Date: 2013-04-19 16:56:44 Summary: Trackster: better handling of variant track labels. Affected #: 1 file diff -r 6faaa8a10977a1cb62682e6a8156b6dc85bc338c -r 6f3b665ace6b76e02ac0a5651801667cca0f50b9 static/scripts/viz/trackster/tracks.js --- a/static/scripts/viz/trackster/tracks.js +++ b/static/scripts/viz/trackster/tracks.js @@ -2940,6 +2940,28 @@ } }); } + + // + // If using SummaryTree tiles, show max and make it editable. + // + this.container_div.find(".yaxislabel").remove(); + var track = this, + first_tile = tiles[0]; + if (first_tile instanceof SummaryTreeTile) { + var max_val = (this.prefs.histogram_max ? this.prefs.histogram_max : first_tile.max_val), + max_label = $("<div/>").text(max_val).make_text_editable({ + num_cols: 12, + on_finish: function(new_val) { + $(".bs-tooltip").remove(); + var new_val = parseFloat(new_val); + track.prefs.histogram_max = (!isNaN(new_val) ? new_val : null); + track.tile_cache.clear(); + track.request_draw(); + }, + help_text: "Set max value; leave blank to use default" + }).addClass('yaxislabel top').css("color", this.prefs.label_color); + this.container_div.prepend(max_label); + } }, /** @@ -3924,30 +3946,9 @@ } // - // If using SummaryTree tiles, show max and make it editable. - // - this.container_div.find(".yaxislabel").remove(); - var first_tile = tiles[0]; - if (first_tile instanceof SummaryTreeTile) { - var max_val = (this.prefs.histogram_max ? this.prefs.histogram_max : first_tile.max_val), - max_label = $("<div/>").text(max_val).make_text_editable({ - num_cols: 12, - on_finish: function(new_val) { - $(".bs-tooltip").remove(); - var new_val = parseFloat(new_val); - track.prefs.histogram_max = (!isNaN(new_val) ? new_val : null); - track.tile_cache.clear(); - track.request_draw(); - }, - help_text: "Set max value; leave blank to use default" - }).addClass('yaxislabel top').css("color", this.prefs.label_color); - this.container_div.prepend(max_label); - } - - // // If not all features slotted, show icon for showing more rows (slots). // - if (first_tile instanceof FeatureTrackTile) { + if (tiles[0] instanceof FeatureTrackTile) { var all_slotted = true; for (i = 0; i < tiles.length; i++) { if (!tiles[i].all_slotted) { @@ -4234,17 +4235,17 @@ postdraw_actions: function(tiles, width, w_scale, clear_after) { TiledTrack.prototype.postdraw_actions.call(this, tiles, width, w_scale, clear_after); - // Add labels if needed and not already included. - if (this.prefs.show_labels) { + // Add summary/sample labels if needed and not already included. + if ( !(tiles[0] instanceof SummaryTreeTile) && this.prefs.show_labels) { // Add and/or style labels. - if (this.container_div.find('.yaxislabel').length === 0) { + if (this.container_div.find('.yaxislabel.variant').length === 0) { // Add summary and sample labels. // FIXME: label attributes could be cleaner by using CSS classes. // Add summary label. var summary_div_font_size = 10, - summary_div = $("<div/>").text('Summary').addClass('yaxislabel top').css({ + summary_div = $("<div/>").text('Summary').addClass('yaxislabel variant top').css({ 'font-size': summary_div_font_size + 'px' }); this.container_div.prepend(summary_div); @@ -4260,7 +4261,7 @@ samples_div_html += (name + '<br>'); }); - var samples_div = $("<div/>").html(samples_div_html).addClass('yaxislabel top sample').css({ + var samples_div = $("<div/>").html(samples_div_html).addClass('yaxislabel variant top sample').css({ // +2 for padding 'top': base_offset + this.prefs.summary_height + 2, }); @@ -4278,7 +4279,7 @@ } else { // Remove all labels. - this.container_div.find('.yaxislabel').remove(); + this.container_div.find('.yaxislabel.variant').remove(); } } }); https://bitbucket.org/galaxy/galaxy-central/commits/833574121ea5/ Changeset: 833574121ea5 User: jgoecks Date: 2013-04-17 16:58:19 Summary: Whitespace additions. Affected #: 1 file diff -r da5a5077ef1ebffa9e0ad9039ca4463298815de1 -r 833574121ea51428ba393d932a6391244f2a3d04 static/scripts/viz/trackster/tracks.js --- a/static/scripts/viz/trackster/tracks.js +++ b/static/scripts/viz/trackster/tracks.js @@ -3271,20 +3271,25 @@ } } ].concat(TiledTrack.prototype.action_icons_def), + // HACK: CompositeTrack should inherit from DrawableCollection as well. /** * Returns representation of object in a dictionary for easy saving. * Use from_dict to recreate object. */ to_dict: DrawableCollection.prototype.to_dict, + add_drawable: DrawableCollection.prototype.add_drawable, + unpack_drawables: DrawableCollection.prototype.unpack_drawables, + change_mode: function(new_mode) { TiledTrack.prototype.change_mode.call(this, new_mode); for (var i = 0; i < this.drawables.length; i++) { this.drawables[i].change_mode(new_mode); } }, + /** * Initialize component tracks and draw composite track when all components are initialized. */ @@ -3302,13 +3307,16 @@ track.request_draw(); }); }, + update_icons: function() { // For now, hide filters and tool. this.action_icons.filters_icon.hide(); this.action_icons.tools_icon.hide(); this.action_icons.param_space_viz_icon.hide(); }, + can_draw: Drawable.prototype.can_draw, + draw_helper: function(force, region, resolution, parent_element, w_scale, kwargs) { // FIXME: this function is similar to TiledTrack.draw_helper -- can the two be merged/refactored? var track = this, @@ -3421,6 +3429,7 @@ // Returned Deferred that is resolved when tile can be drawn. return can_draw; }, + /** * Replace this track with group that includes individual tracks. */ @@ -3442,6 +3451,7 @@ var index = this.container.replace_drawable(this, group, true); group.request_draw(); }, + /** * Actions taken before drawing a tile. */ @@ -3474,6 +3484,7 @@ track.prefs.max_value = max; } }, + /** * Actions to be taken after draw has been completed. Draw is completed when all tiles have been * drawn/fetched and shown. 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