Commit f933c5e4 authored by marc's avatar marc Committed by Mathieu Giraud

list.js : bug fix => update display after merge/split clusters

parent 55b14320
......@@ -451,7 +451,7 @@ List.prototype = {
var self = this;
var div_elem = this.index[cloneID];
if (!this.m.clone(cloneID).isActive()){
if (!this.m.clone(cloneID).isActive() || this.m.clusters[cloneID].length == 0){
div_elem.style.display = "none";
}else{
div_elem.style.display = "block";
......@@ -493,6 +493,10 @@ List.prototype = {
self.div_cluster(document.getElementById("cluster" + cloneID), cloneID);
} else {
span_cluster.appendChild(document.createTextNode(' '));
//update cluster display
var display = this.m.clone(cloneID).split
if (this.m.clusters[cloneID].length < 2) display = false
document.getElementById("cluster"+cloneID).style.display = "none";
}
}
}
......@@ -662,7 +666,7 @@ List.prototype = {
var div = this.index[list[i]];
if (!this.m.clone(list[i]).isActive()){
if (!this.m.clone(list[i]).isActive() || this.m.clusters[list[i]].length == 0){
div.style.display = "none";
}else{
div.style.display = "block";
......
......@@ -1163,6 +1163,7 @@ Model.prototype = {
//le cluster retrouve sa liste de clones -1
this.clusters[clusterID] = nlist;
if (this.clusters[clusterID].length <= 1) this.clone(clusterID).split = false;
//le clone forme un cluster de 1 clone
this.clusters[cloneID] = [cloneID];
......
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