commit/galaxy-central: jgoecks: Trackster filters improvements: (a) stop propagation of keydown events to viz; and (b) simplify min and max calculations.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/8333828fcc9e/ changeset: r5495:8333828fcc9e user: jgoecks date: 2011-05-02 23:35:06 summary: Trackster filters improvements: (a) stop propagation of keydown events to viz; and (b) simplify min and max calculations. affected #: 1 file (7 bytes) --- a/static/scripts/trackster.js Mon May 02 15:14:53 2011 -0400 +++ b/static/scripts/trackster.js Mon May 02 17:35:06 2011 -0400 @@ -158,14 +158,6 @@ exports.sortable = sortable; /** - * Calculates step for slider with a given min, max. - */ -var get_slider_step = function(min, max) { - var range = max - min; - return (range <= 2 ? 0.01 : (range <= 100 ? 1 : (range <= 1000 ? 5 : 10))); -}; - -/** * Init constants & functions used throughout trackster. */ var @@ -1077,6 +1069,11 @@ * Update filter's slider. */ update_ui_elt: function () { + var get_slider_step = function(min, max) { + var range = max - min; + return (range <= 2 ? 0.01 : 1); + }; + var slider_min = this.slider.slider("option", "min"), slider_max = this.slider.slider("option", "max"); @@ -1180,13 +1177,15 @@ // Create filtering div. this.parent_div = $("<div/>").addClass("filters").hide(); - // Disable dragging, double clicking on div so that actions on slider do not impact viz. + // Disable dragging, double clicking, keys on div so that actions on slider do not impact viz. this.parent_div.bind("drag", function(e) { e.stopPropagation(); }).bind("click", function(e) { e.stopPropagation(); }).bind("dblclick", function(e) { e.stopPropagation(); + }).bind("keydown", function(e) { + e.stopPropagation(); }); var manager = this; $.each(this.filters, function(index, filter) { 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)
-
Bitbucket