1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/0da18c7ba18d/ changeset: 0da18c7ba18d user: jgoecks date: 2012-07-14 01:44:21 summary: Trackster: make sliders more responsive by waiting before drawing. affected #: 1 file diff -r 02ce2ca3fa2dac4c4155b7f07f0699d519b4d853 -r 0da18c7ba18dcc0eaf9e14596b5ff0dc348457bc static/scripts/viz/trackster.js --- a/static/scripts/viz/trackster.js +++ b/static/scripts/viz/trackster.js @@ -2083,7 +2083,6 @@ // Set up slider for filter. var slider_div = $("<div/>").addClass("slider").appendTo(filter.parent_div); filter.control_element = $("<div/>").attr("id", filter.name + "-filter-control").appendTo(slider_div); - var prev_values = [0,0]; filter.control_element.slider({ range: true, min: this.min, @@ -2193,17 +2192,23 @@ * Handle slide events. */ slide: function(event, ui) { - var values = ui.values; + var values = ui.values; + + // Set new values in UI. + this.values_span.text(values[0] + "-" + values[1]); + + // Set new values in filter. + this.low = values[0]; + this.high = values[1]; - // Set new values in UI. - this.values_span.text(values[0] + "-" + values[1]); + // Set timeout to update if filter low, high are stable. + var self = this; + setTimeout(function() { + if (values[0] === self.low && values[1] === self.high) { + self.manager.track.request_draw(true, true); + } + }, 25); - // Set new values in filter. - this.low = values[0]; - this.high = values[1]; - - // Redraw track. - this.manager.track.request_draw(true, true); }, /** * Returns true if filter can be applied to element. 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.