Commit f09e451a authored by Marc Duez's avatar Marc Duez
Browse files

list.js : add icon system indicator for each clones

parent 7949d2b6
......@@ -361,10 +361,11 @@ line {
@width_starBox : 16px;
@width_sizeBox : 60px;
@width_infoBox : 20px;
@width_systemBox : 16px;
@width_listElem : (@width_left_container - @width_scrollbar);
@margin : 6px;
@margin_nameBox : 10px;
@width_nameBox : (@width_listElem - @width_starBox - @width_infoBox - @width_sizeBox - @width_clusterBox - @margin_nameBox);
@width_nameBox : (@width_listElem - @width_starBox - @width_infoBox - @width_sizeBox - @width_clusterBox - @margin_nameBox - @width_systemBox);
.list:hover, .tagElem:hover{
......@@ -408,7 +409,7 @@ line {
}
.nameBox {
width: @width_nameBox;
width: 300px;
margin-right: @margin_nameBox;
overflow: hidden;
display: inline-block;
......@@ -446,6 +447,21 @@ line {
}
.systemBox {
display: inline-block;
width: @width_systemBox;
height: 16px;
text-align: center;
border-radius: 3px;
border-style: solid;
border-width: 1px;
float: left;
margin : 2px;
margin-top: 0px;
color: @select;
font-family: monospace;
}
.clusterBox{
width: @width_clusterBox;
float: left;
......@@ -1251,4 +1267,4 @@ input:focus, textarea:focus {
box-shadow: inset 0 1px 1px @background, 0 0 8px @border;
outline: 0;
outline: thin dotted \9;
}
\ No newline at end of file
}
......@@ -1002,5 +1002,14 @@ germline={
"TRGJP*01": "tgggcaagagttgggcaaaaaaatcaaggtatttggtcccggaacaaagcttatcattacag",
"TRGJP1*01": "ataccactggttggttcaagatatttgctgaagggactaagctcatagtaacttcacctg",
"TRGJP2*01": "atagtagtgattggatcaagacgtttgcaaaagggactaggctcatagtaacttcgcctg"
},
"icon":{
"TRG":{ "letter" : "G", "color" : "#dc322f"},
"TRB":{ "letter" : "B", "color" : "#cb4b16"},
"TRD":{ "letter" : "D", "color" : "#b58900"},
"TRA":{ "letter" : "A", "color" : "#268bd2"},
"IGH":{ "letter" : "H", "color" : "#6c71c4"},
"IGK":{ "letter" : "K", "color" : "#2aa198"},
"IGL":{ "letter" : "L", "color" : "#d33682"},
}
}
\ No newline at end of file
......@@ -161,6 +161,7 @@ List.prototype = {
div_elem.className = "listElem";
div_elem.style.display = "block";
var span_name = document.createElement('div');
span_name.className = "nameBox";
span_name.ondblclick = function () {
......@@ -173,12 +174,12 @@ List.prototype = {
span_name.title = this.m.getName(cloneID);
span_name.style.color = this.m.windows[cloneID].color;
var span_star = document.createElement('div');
span_star.className = "starBox";
span_star.onclick = function () {
changeTag(cloneID);
}
var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg')
var path = document.createElementNS('http://www.w3.org/2000/svg', 'path')
path.setAttribute('d', this.starPath);
......@@ -186,9 +187,9 @@ List.prototype = {
if (typeof this.m.windows[cloneID].tag != 'undefined') path.setAttribute("fill", tagColor[this.m.windows[cloneID].tag]);
else path.setAttribute("fill", color['@default']);
svg.appendChild(path);
span_star.appendChild(svg)
var span_size = document.createElement('span')
span_size.className = "sizeBox";
span_size.onclick = function (e) {
......@@ -197,6 +198,7 @@ List.prototype = {
span_size.style.color = this.m.windows[cloneID].color;
span_size.appendChild(document.createTextNode(this.m.getStrSize(cloneID)));
var span_info = document.createElement('span')
span_info.className = "infoBox";
span_info.onclick = function () {
......@@ -204,6 +206,7 @@ List.prototype = {
}
span_info.appendChild(document.createTextNode("I"));
var span_cluster = document.createElement('span')
span_cluster.className = "clusterBox";
if (this.m.clones[cloneID].cluster.length > 1) {
......@@ -222,7 +225,22 @@ List.prototype = {
span_cluster.appendChild(document.createTextNode(' '));
}
if (this.m.system=="multi"){
var span_system = document.createElement('span')
var system = this.m.windows[cloneID].system
span_system.className = "systemBox";
if (typeof system != 'undefined'){
span_system.appendChild(document.createTextNode(germline.icon[system].letter));
span_system.style.background = germline.icon[system].color
span_system.title = system
}else{
span_system.appendChild(document.createTextNode("?"));
}
}
div_elem.appendChild(span_cluster);
if (this.m.system=="multi") div_elem.appendChild(span_system);
div_elem.appendChild(span_name);
div_elem.appendChild(span_info);
div_elem.appendChild(span_star);
......
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