Commit 1ff5ec05 authored by marc duez's avatar marc duez

model.js : differentiate function resetClones() (destroy all cluster) and...

model.js :  differentiate function resetClones() (destroy all cluster) and restoreClones() (reload user clusters)
parent a1d978f3
......@@ -115,6 +115,7 @@
<div class="menu" onmouseover="showSelector('clusterSelector');" > cluster
<div id="clusterSelector" class="selector"><div>
<a class="buttonSelector" onclick="m.resetClones();">reset</a>
<a class="buttonSelector" onclick="m.restoreClones();">user</a>
<a class="buttonSelector" onclick="m.clusterBy('V');">V gene + allele</a>
<a class="buttonSelector" onclick="m.clusterBy('J');">J gene + allele</a>
<div id="clusterby_button"> </div>
......
......@@ -1639,6 +1639,21 @@ Model.prototype = {
//reset cluster
this.cluster_key = ""
for (var i = 0; i < this.windows.length; i++) {
this.clones[i] = {
cluster: [i]
};
}
this.update()
},
/*
*
* */
restoreClones: function () {
this.cluster_key = ""
this.clones = this.clones_copy
this.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