Commit 52e352b7 authored by flothoni's avatar flothoni Committed by Mathieu Giraud

(WIP) graph-list: third column use to show clone sharing

extracted from !636
parent cd240720
Pipeline #150384 passed with stages
in 12 minutes and 4 seconds
......@@ -311,7 +311,7 @@ Graph.prototype = {
line_content.id = this.id +"_listElem_showAll"
line_content.classList.add("graph_listAll")
line_content.textContent = "show all"
line_content.colSpan = "2"
line_content.colSpan = "3"
line.appendChild(line_content)
table.appendChild(line)
......@@ -321,7 +321,7 @@ Graph.prototype = {
line_content.id = this.id +"_listElem_hideAll"
line_content.classList.add("graph_listAll")
line_content.textContent = "focus on selected samples"
line_content.colSpan = "2"
line_content.colSpan = "3"
line.appendChild(line_content)
table.appendChild(line)
......@@ -331,7 +331,7 @@ Graph.prototype = {
line_content.id = this.id +"_listElem_hideNotShare"
line_content.classList.add("graph_listAll")
line_content.textContent = "focus on selected clones"
line_content.colSpan = "2"
line_content.colSpan = "3"
line.appendChild(line_content)
table.appendChild(line)
......@@ -355,9 +355,15 @@ Graph.prototype = {
content_check.id = this.id +"_listElem_check_"+i
content_check.dataset.time = i
line_content_check.appendChild(content_check)
// Case share
var line_content_share = document.createElement("td")
line_content_share.classList.add("graph_listElem_text")
line_content_share.id = this.id +"_listElem_share_"+i
line_content_share.dataset.time = i
list_content.appendChild(line_content_check)
list_content.appendChild(line_content_text)
list_content.appendChild(line_content_share)
// Add all descripion of sample keys as tooltip
var tooltip = this.m.getStrTime(i, "names")
......@@ -407,6 +413,7 @@ Graph.prototype = {
for (var time = 0; time < this.m.samples.number; time++) {
this.updateListCheckbox(time)
this.updateListName(time)
this.updateListShare(time)
}
return
},
......@@ -492,6 +499,22 @@ Graph.prototype = {
}
},
/**
* Update the text of a sample. Adapt it with the model time_type format
* @param {Number} time The timepoint to update
*/
updateListShare: function(time){
var share_id = this.id +"_listElem_share_"+time
var share = document.getElementById(share_id)
var shared_clones = this.m.share_clone(time, undefined, select=true)
// console.default.log( "shared: " + time + ": "+ shared_clones )
if (shared_clones.length > 0){
share.textContent = "*"
} else {
share.textContent = ""
}
return
},
......
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