Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit bbc6c6f8 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

scatterPlot.js: extract updateCloneSize() from updateClone(), add comments

parent 65aad1a6
......@@ -1398,30 +1398,46 @@ ScatterPlot.prototype = {
return this.resizeCoef * Math.pow((size + this.resizeMinSize), (1 / 3)) / 25
},
/**
* Update the size of a single clone
* @param {integer} cloneID - clone index
* @param {float} size
* */
updateCloneSize: function(cloneID, size)
{
if (this.otherVisibility) {
var otherSize = this.m.clone(cloneID).getSequenceSize(this.m.tOther)
if (otherSize > size) size = otherSize
}
this.nodes[cloneID].s = size
this.nodes[cloneID].r1 = this.radiusClone(size)
},
/**
* update color/style/position of a single clone
* Update color/style/position of a single clone
* @param {integer} cloneID - clone index
* */
updateClone: function(cloneID) {
// Clone size
if (this.m.clone(cloneID)
.isActive()) {
if (this.m.clone(cloneID)
.split) {
// Display merged sub-clones
for (var i = 0; i < this.m.clusters[cloneID].length; i++) {
var seqID = this.m.clusters[cloneID][i]
var size = this.m.clone(seqID)
.getSequenceSize();
if (this.otherVisibility) {
var otherSize = this.m.clone(seqID).getSequenceSize(this.m.tOther)
if (otherSize > size) size = otherSize
}
this.nodes[seqID].s = size
this.nodes[seqID].r1 = this.radiusClone(size)
this.updateCloneSize(seqID, size)
}
} else {
// Do not display merged sub-clones
for (var i = 0; i < this.m.clusters[cloneID].length; i++) {
var seqID = this.m.clusters[cloneID][i]
this.nodes[seqID].s = 0
......@@ -1432,19 +1448,16 @@ ScatterPlot.prototype = {
if (this.m.clusters[cloneID].length == 0) size = this.m.clone(cloneID)
.getSequenceSize();
if (this.otherVisibility) {
var otherSize = this.m.clone(seqID).getSequenceSize(this.m.tOther)
if (otherSize > size) size = otherSize
}
this.nodes[cloneID].s = size
this.nodes[cloneID].r1 = this.radiusClone(size)
this.updateCloneSize(cloneID, size)
}
} else {
this.nodes[cloneID].r1 = 0
this.nodes[cloneID].s = 0
}
// Clone position
var sys = this.m.clone(cloneID)
.get('germline')
if (this.use_system_grid && this.m.system == "multi" && typeof sys != 'undefined' && sys != this.m.germlineV.system) {
......
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