From 0bcd4656bda25d9223d629e3edf2494631600570 Mon Sep 17 00:00:00 2001 From: Kanwei Li Date: Thu, 3 Jun 2010 17:58:58 -0400 Subject: [PATCH] trackster: Implemented drag-zooming by letting you drag a region in the top label track (where chrom position is shown). Refactored to not use zoom levels anymore. --- static/scripts/galaxy.base.js | 9 ++++ static/scripts/packed/galaxy.base.js | 2 +- static/scripts/packed/trackster.js | 2 +- static/scripts/trackster.js | 72 ++++++++++++---------------- static/trackster.css | 1 - static/welcome.html | 2 +- templates/tracks/browser.mako | 50 +++++++++++++++---- 7 files changed, 83 insertions(+), 55 deletions(-) diff --git a/static/scripts/galaxy.base.js b/static/scripts/galaxy.base.js index 2c4827b1e77..9d6a81634c3 100644 --- a/static/scripts/galaxy.base.js +++ b/static/scripts/galaxy.base.js @@ -454,6 +454,15 @@ function init_history_items(historywrapper, noinit, nochanges) { } } +function commatize( number ) { + number += ''; // Convert to string + var rgx = /(\d+)(\d{3})/; + while (rgx.test(number)) { + number = number.replace(rgx, '$1' + ',' + '$2'); + } + return number; +} + $(document).ready( function() { // Links with confirmation $( "a[confirm]" ).click( function() { diff --git a/static/scripts/packed/galaxy.base.js b/static/scripts/packed/galaxy.base.js index ce7f5eadc21..a7cf0fbd953 100644 --- a/static/scripts/packed/galaxy.base.js +++ b/static/scripts/packed/galaxy.base.js @@ -1 +1 @@ -$(document).ready(function(){replace_big_select_inputs()});$.fn.makeAbsolute=function(a){return this.each(function(){var b=$(this);var c=b.position();b.css({position:"absolute",marginLeft:0,marginTop:0,top:c.top,left:c.left,right:$(window).width()-(c.left+b.width())});if(a){b.remove().appendTo("body")}})};function ensure_popup_helper(){if($("#popup-helper").length===0){$("