Commit ce221b32 authored by Mikaël Salson's avatar Mikaël Salson
Browse files

clone.js: converSeg directly called by the Clone.

As Clone can be built independently it is important that convertSeg
is called directly in the Clone constructor and not afterwards in the model.
parent 5ac26e1b
......@@ -40,6 +40,7 @@ function Clone(data, model, index, virtual) {
for (var i=0; i<key.length; i++ ){
this[key[i]]=data[key[i]]
}
this.seg = this.m.convertSeg(this.seg)
if (typeof (this.getSequence()) != 'undefined' && typeof (this.name) != 'undefined') {
this.shortName = this.name.replace(new RegExp('IGHV', 'g'), "VH");
......
......@@ -258,7 +258,6 @@ Model.prototype = {
var clone = this.clone(i)
clone.colorN = colorGenerator((((clone.getNlength() / n_max) - 1) * (-250)));
clone.tag = this.default_tag;
clone.seg = this.convertSeg(clone.seg);
}
this.applyAnalysis(this.analysis);
......
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