mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Trackster: when creating a visualization, default the view to the first chromosome.
This commit is contained in:
@@ -1190,7 +1190,7 @@ extend( TracksterView.prototype, DrawableCollection.prototype, {
|
||||
view.chrom_select.html(chrom_options);
|
||||
view.chrom_start_index = result.start_index;
|
||||
|
||||
chrom_data.resolve(result);
|
||||
chrom_data.resolve(result.chrom_info);
|
||||
},
|
||||
error: function() {
|
||||
alert("Could not load chroms for this dbkey:", view.dbkey);
|
||||
|
||||
@@ -188,7 +188,7 @@ var TracksterUI = base.Base.extend({
|
||||
var self = this,
|
||||
view = new tracks.TracksterView(view_config);
|
||||
view.editor = true;
|
||||
$.when( view.load_chroms_deferred ).then(function() {
|
||||
$.when( view.load_chroms_deferred ).then(function(chrom_info) {
|
||||
// Viewport config.
|
||||
if (viewport_config) {
|
||||
var
|
||||
@@ -201,6 +201,10 @@ var TracksterUI = base.Base.extend({
|
||||
view.change_chrom(chrom, start, end);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// No viewport, so use first chromosome.
|
||||
view.change_chrom(chrom_info[0].chrom);
|
||||
}
|
||||
|
||||
// Add drawables to view.
|
||||
if (drawables_config) {
|
||||
|
||||
Reference in New Issue
Block a user