From 93dbdc044af5bfc6c415cf308a2a3fb3ee13a3e2 Mon Sep 17 00:00:00 2001 From: Jeremy Goecks Date: Wed, 2 Nov 2011 18:05:38 -0400 Subject: [PATCH] Trackster: fix bug in showing 'add datasets' button and rename update_track_icons to update_icons for clarity. --- static/scripts/trackster.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/static/scripts/trackster.js b/static/scripts/trackster.js index f31698af2ed..b83a78e7024 100644 --- a/static/scripts/trackster.js +++ b/static/scripts/trackster.js @@ -679,7 +679,7 @@ extend(Drawable.prototype, { request_draw: function() {}, _draw: function() {}, to_json: function() {}, - update_track_icons: function() {}, + update_icons: function() {}, /** * Set drawable name. */ @@ -819,14 +819,14 @@ var DrawableGroup = function(name, view, container, prefs) { is_container(this.content_div, this); moveable(this.container_div, this.drag_handle_class, ".group", this); - this.update_track_icons(); + this.update_icons(); }; extend(DrawableGroup.prototype, Drawable.prototype, DrawableCollection.prototype, { /** * Make popup menu for group. */ - update_track_icons: function() { + update_icons: function() { var group = this; var group_dropdown = {}; @@ -1073,7 +1073,7 @@ extend( View.prototype, DrawableCollection.prototype, { }, /** Add or remove intro div depending on view state. */ update_intro_div: function() { - if (this.num_tracks === 0) { + if (this.drawables.length === 0) { this.intro_div.appendTo(this.viewport_container); } else { @@ -2531,7 +2531,7 @@ extend(Track.prototype, Drawable.prototype, { } else if (result['status'] === "data") { if (result['valid_chroms']) { track.valid_chroms = result['valid_chroms']; - track.update_track_icons(); + track.update_icons(); } track.content_div.text(DATA_OK); if (track.view.chrom) { @@ -2547,7 +2547,7 @@ extend(Track.prototype, Drawable.prototype, { } }); - this.update_track_icons(); + this.update_icons(); }, /** * Additional initialization required before drawing track for the first time. @@ -2625,7 +2625,7 @@ extend(TiledTrack.prototype, Drawable.prototype, Track.prototype, { /** * Update track's buttons. */ - update_track_icons: function() { + update_icons: function() { var track = this; // @@ -3287,7 +3287,7 @@ extend(FeatureTrack.prototype, Drawable.prototype, TiledTrack.prototype, { if (!track.filters_available) { track.filters_div.hide(); } - track.update_track_icons(); + track.update_icons(); } } }, @@ -3601,7 +3601,7 @@ var ReadTrack = function (name, view, container, hda_ldda, dataset_id, prefs, fi this.prefs = this.config.values; this.painter = painters.ReadPainter; - this.update_track_icons(); + this.update_icons(); }; extend(ReadTrack.prototype, Drawable.prototype, TiledTrack.prototype, FeatureTrack.prototype);