commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/0b5c9c031f72/ Changeset: 0b5c9c031f72 User: jgoecks Date: 2013-05-02 16:33:28 Summary: Trackster: remove nodraw parameter because it is no longer needed. Affected #: 1 file diff -r 72a381a4f692feb906e85f6cfed99c7407640282 -r 0b5c9c031f72526d506cb5acf55fb79ec0af1732 static/scripts/viz/trackster/tracks.js --- a/static/scripts/viz/trackster/tracks.js +++ b/static/scripts/viz/trackster/tracks.js @@ -892,7 +892,7 @@ ], saved_values: obj_dict.prefs, onchange: function() { - track.request_redraw(false, true); + track.request_redraw(true); } }); }, @@ -1266,8 +1266,7 @@ view.chrom_select.val(view.chrom); view.max_high = found.len-1; // -1 because we're using 0-based indexing. view.reset(); - view.request_redraw(true); - + for (var i = 0, len = view.drawables.length; i < len; i++) { var drawable = view.drawables[i]; if (drawable.init) { @@ -1392,8 +1391,7 @@ * Request that view redraw some or all tracks. If a track is not specificied, redraw all tracks. */ // FIXME: change method call so that track is first and additional parameters are optional. - // FIXME: is nodraw parameter needed? - request_redraw: function(nodraw, force, clear_after, a_track) { + request_redraw: function(force, clear_after, a_track) { var view = this, // Either redrawing a single drawable or all view's drawables. @@ -1428,7 +1426,7 @@ // Set up redraw if it has not been requested since last redraw. if (!this.requested_redraw) { - requestAnimationFrame(function() { view._redraw(nodraw); }); + requestAnimationFrame(function() { view._redraw(); }); this.requested_redraw = true; } }, @@ -1437,7 +1435,7 @@ * NOTE: this method should never be called directly; request_redraw() should be used so * that requestAnimationFrame can manage redrawing. */ - _redraw: function(nodraw) { + _redraw: function() { // TODO: move this code to function that does location setting. // Clear because requested redraw is being handled now. @@ -1482,20 +1480,18 @@ this.overview_highlight.css({ left: left_px, width: width_px }); } - if (!nodraw) { - var track, force, clear_after; - for (var i = 0, len = this.tracks_to_be_redrawn.length; i < len; i++) { - track = this.tracks_to_be_redrawn[i][0]; - force = this.tracks_to_be_redrawn[i][1]; - clear_after = this.tracks_to_be_redrawn[i][2]; - if (track) { - track._draw(force, clear_after); - } + var track, force, clear_after; + for (var i = 0, len = this.tracks_to_be_redrawn.length; i < len; i++) { + track = this.tracks_to_be_redrawn[i][0]; + force = this.tracks_to_be_redrawn[i][1]; + clear_after = this.tracks_to_be_redrawn[i][2]; + if (track) { + track._draw(force, clear_after); } - this.tracks_to_be_redrawn = []; - for (i = 0, len = this.label_tracks.length; i < len; i++) { - this.label_tracks[i]._draw(); - } + } + this.tracks_to_be_redrawn = []; + for (i = 0, len = this.label_tracks.length; i < len; i++) { + this.label_tracks[i]._draw(); } }, zoom_in: function (point, container) { @@ -2848,7 +2844,7 @@ * Request that track be drawn. */ request_draw: function(force, clear_after) { - this.view.request_redraw(false, force, clear_after, this); + this.view.request_redraw(force, clear_after, this); }, /** https://bitbucket.org/galaxy/galaxy-central/commits/a26ec089b62f/ Changeset: a26ec089b62f User: jgoecks Date: 2013-05-02 16:58:19 Summary: Trackster: optionally clear tile cache when requesting a track redraw. Affected #: 2 files diff -r 0b5c9c031f72526d506cb5acf55fb79ec0af1732 -r a26ec089b62fc2eb4824e738b7cc668b481de184 static/scripts/viz/trackster/filters.js --- a/static/scripts/viz/trackster/filters.js +++ b/static/scripts/viz/trackster/filters.js @@ -178,7 +178,7 @@ filter.manager.alpha_filter = null; filter.transparency_icon.removeClass("active"); } - filter.manager.track.request_draw(true, true); + filter.manager.track.request_draw(false, true, true); } ) .appendTo(display_controls_div).hide(); this.height_icon = create_action_icon("Use filter for data height", "arrow-resize-090", @@ -195,7 +195,7 @@ filter.manager.height_filter = null; filter.height_icon.removeClass("active"); } - filter.manager.track.request_draw(true, true); + filter.manager.track.request_draw(false, true, true); } ) .appendTo(display_controls_div).hide(); filter.parent_div.hover( function() { @@ -265,7 +265,7 @@ var self = this; setTimeout(function() { if (values[0] === self.low && values[1] === self.high) { - self.manager.track.request_draw(true, true); + self.manager.track.request_draw(false, true, true); } }, 25); diff -r 0b5c9c031f72526d506cb5acf55fb79ec0af1732 -r a26ec089b62fc2eb4824e738b7cc668b481de184 static/scripts/viz/trackster/tracks.js --- a/static/scripts/viz/trackster/tracks.js +++ b/static/scripts/viz/trackster/tracks.js @@ -845,9 +845,9 @@ return obj_dict; }, - request_draw: function(clear_after, force) { + request_draw: function(clear_tile_cache, force, clear_after) { for (var i = 0; i < this.drawables.length; i++) { - this.drawables[i].request_draw(clear_after, force); + this.drawables[i].request_draw(clear_tile_cache, force, clear_after); } } }); @@ -1390,7 +1390,6 @@ /** * Request that view redraw some or all tracks. If a track is not specificied, redraw all tracks. */ - // FIXME: change method call so that track is first and additional parameters are optional. request_redraw: function(force, clear_after, a_track) { var view = this, @@ -2101,7 +2100,7 @@ tile.stale = true; track.data_manager.get_more_data(tile_region, track.mode, tile.resolution, {}, track.data_manager.DEEP_DATA_REQ); $(".bs-tooltip").hide(); - track.request_draw(true); + track.request_draw(false, true); }).dblclick(function(e) { // Do not propogate as this would normally zoom in. e.stopPropagation(); @@ -2112,7 +2111,7 @@ tile.stale = true; track.data_manager.get_more_data(tile_region, track.mode, tile.resolution, {}, track.data_manager.BROAD_DATA_REQ); $(".bs-tooltip").hide(); - track.request_draw(true); + track.request_draw(false, true); }).dblclick(function(e) { // Do not propogate as this would normally zoom in. e.stopPropagation(); @@ -2786,8 +2785,7 @@ // TODO: is it necessary to store the mode in two places (.mode and track_config)? track.mode = new_mode; track.config.values['mode'] = new_mode; - track.tile_cache.clear(); - track.request_draw(); + track.request_draw(true); this.action_icons.mode_icon.attr("title", "Set display mode (now: " + track.mode + ")"); return track; }, @@ -2843,7 +2841,10 @@ /** * Request that track be drawn. */ - request_draw: function(force, clear_after) { + request_draw: function(clear_tile_cache, force, clear_after) { + if (clear_tile_cache) { + this.tile_cache.clear(); + } this.view.request_redraw(force, clear_after, this); }, @@ -2962,8 +2963,7 @@ $(".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(); + track.request_draw(true); }, help_text: "Set max value; leave blank to use default" }).addClass('yaxislabel top').css("color", this.prefs.label_color); @@ -3670,8 +3670,7 @@ set_min_value: function(new_val) { this.prefs.min_value = new_val; $('#linetrack_' + this.dataset.id + '_minval').text(this.prefs.min_value); - this.tile_cache.clear(); - this.request_draw(); + this.request_draw(true); }, /** @@ -3680,8 +3679,7 @@ set_max_value: function(new_val) { this.prefs.max_value = new_val; $('#linetrack_' + this.dataset.id + '_maxval').text(this.prefs.max_value); - this.tile_cache.clear(); - this.request_draw(); + this.request_draw(true); }, predraw_init: function() { @@ -3811,16 +3809,14 @@ */ set_min_value: function(new_val) { this.prefs.min_value = new_val; - this.tile_cache.clear(); - this.request_draw(); + this.request_draw(true); }, /** * Set track maximum value. */ set_max_value: function(new_val) { this.prefs.max_value = new_val; - this.tile_cache.clear(); - this.request_draw(); + this.request_draw(true); }, /** @@ -3874,9 +3870,8 @@ saved_values: obj_dict.prefs, onchange: function() { track.set_name(track.prefs.name); - track.tile_cache.clear(); track.set_painter_from_config(); - track.request_draw(); + track.request_draw(true); } }); this.prefs = this.config.values; @@ -4210,8 +4205,7 @@ saved_values: obj_dict.prefs, onchange: function() { this.track.set_name(this.track.prefs.name); - this.track.tile_cache.clear(); - this.track.request_draw(); + this.track.request_draw(true); } }); this.prefs = this.config.values; @@ -4369,8 +4363,7 @@ saved_values: obj_dict.prefs, onchange: function() { this.track.set_name(this.track.prefs.name); - this.track.tile_cache.clear(); - this.track.request_draw(); + this.track.request_draw(true); } }); this.prefs = this.config.values; 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