mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fixes for Trackster and Circster, mostly around preference selection and usage.
This commit is contained in:
@@ -32,7 +32,7 @@ var ConfigSetting = Backbone.Model.extend({
|
||||
* Cast and set value. This should be instead of
|
||||
* setting.set('value', new_value)
|
||||
*/
|
||||
set_value: function(value) {
|
||||
set_value: function(value, options) {
|
||||
var type = this.get('type');
|
||||
|
||||
if (type === 'float') {
|
||||
@@ -43,7 +43,7 @@ var ConfigSetting = Backbone.Model.extend({
|
||||
}
|
||||
// TODO: handle casting from string to bool?
|
||||
|
||||
this.set('value', value);
|
||||
this.set({value: value}, options);
|
||||
}
|
||||
}, {
|
||||
// This is a master list of default settings for known settings.
|
||||
@@ -101,10 +101,10 @@ var ConfigSettingCollection = Backbone.Collection.extend({
|
||||
/**
|
||||
* Set value for a setting.
|
||||
*/
|
||||
set_value: function(key, value) {
|
||||
set_value: function(key, value, options) {
|
||||
var s = this.get(key);
|
||||
if (s) {
|
||||
return s.set_value(value);
|
||||
return s.set_value(value, options);
|
||||
}
|
||||
|
||||
return undefined;
|
||||
|
||||
@@ -620,8 +620,13 @@ var CircsterTrackView = Backbone.View.extend({
|
||||
$.when(track.get('data_manager').get_genome_wide_data(this.genome)).then(function(genome_wide_data) {
|
||||
// Set bounds.
|
||||
self.data_bounds = self.get_data_bounds(genome_wide_data);
|
||||
track.get('config').set_value('min_value', self.data_bounds[0]);
|
||||
track.get('config').set_value('max_value', self.data_bounds[1]);
|
||||
|
||||
// Set min, max value in config so that they can be adjusted. Make this silent
|
||||
// because these attributes are watched for changes and the viz is updated
|
||||
// accordingly (set up in initialize). Because we are setting up, we don't want
|
||||
// the watch to trigger events here.
|
||||
track.get('config').set_value('min_value', self.data_bounds[0], {silent: true});
|
||||
track.get('config').set_value('max_value', self.data_bounds[1], {silent: true});
|
||||
|
||||
// Merge chroms layout with data.
|
||||
layout_and_data = _.zip(chrom_arcs, genome_wide_data),
|
||||
|
||||
@@ -994,7 +994,8 @@ var TracksterView = Backbone.View.extend({
|
||||
};
|
||||
}));
|
||||
});
|
||||
}
|
||||
},
|
||||
minLength: 2
|
||||
});
|
||||
});
|
||||
if (this.vis_id !== undefined) {
|
||||
|
||||
@@ -894,7 +894,7 @@ var BackboneTrack = Backbone.Model.extend(CustomToJSON).extend({
|
||||
|
||||
// -- Set up config settings. --
|
||||
var models = [
|
||||
{ key: 'name', value: this.get('dataset').get('name') },
|
||||
{ key: 'name', default_value: this.get('dataset').get('name') },
|
||||
{ key: 'color' },
|
||||
{ key: 'min_value', label: 'Min Value', type: 'float', default_value: 0 },
|
||||
{ key: 'max_value', label: 'Max Value', type: 'float', default_value: 1 }
|
||||
|
||||
Reference in New Issue
Block a user