Commit b33a2f6e authored by flothoni's avatar flothoni

info.js & model.js; update the function updateElemStyle from info view

Link to #4397
parent 3f4b6e18
Pipeline #159082 passed with stages
in 13 minutes and 40 seconds
......@@ -190,6 +190,7 @@ Info.prototype = {
parent.appendChild(div_sequence_info);
this.builder.initTag();
this.colorMethod = this.m.colorMethod
} catch(err) {
sendErrorToDb(err, this.db);
}
......@@ -283,6 +284,16 @@ Info.prototype = {
this.post_save(this);
},
/**
* Update the view. Change the color method if an update is detected in model
* @param {integer[]} - list - array of clone index
* */
updateElemStyle: function (list) {
if (this.m.colorMethod != this.colorMethod)
this.update()
this.colorMethod = this.m.colorMethod
},
create_sample_info_container: function(info, className, id, placeholder, target) {
var self = this;
var container = this.create_info_container(info, className, id, placeholder);
......
......@@ -2431,13 +2431,6 @@ changeAlleleNotation: function(alleleNotation) {
var list = [];
for (var i = 0; i<this.clones.length; i++) list.push(i);
this.updateElemStyle(list);
// Add update of the color method hint in info panel
for (var vpos = 0; vpos<this.view.length; vpos++){
var view = this.view[vpos]
if (view.id == "info"){
view.update()
}
}
},
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment