Commit 247e4dde authored by Marc Duez's avatar Marc Duez
Browse files

segmenter.js : display only available checkbox for highlight

parent c6c63a98
...@@ -170,20 +170,33 @@ Segment.prototype = { ...@@ -170,20 +170,33 @@ Segment.prototype = {
div_highlight.appendChild(input) div_highlight.appendChild(input)
} }
*/ */
if (fields.indexOf("cdr3") != -1) {
var cdr3Checkbox = document.createElement('input');
cdr3Checkbox.type = "checkbox"; var aaCheckbox = document.createElement('input');
cdr3Checkbox.onclick = function () { aaCheckbox.type = "checkbox";
var id = 0; aaCheckbox.onclick = function () {
if (this.checked){ segment.amino = this.checked;
segment.highlight[id].field = "cdr3"; segment.update();
}else{
segment.highlight[id].field = "";
} }
segment.update(); div_highlight.appendChild(aaCheckbox)
div_highlight.appendChild(document.createTextNode("AA"));
var cdr3Checkbox = document.createElement('input');
cdr3Checkbox.type = "checkbox";
cdr3Checkbox.onclick = function () {
var id = 0;
if (this.checked){
segment.highlight[id].field = "cdr3";
}else{
segment.highlight[id].field = "";
}
segment.update();
}
div_highlight.appendChild(cdr3Checkbox)
div_highlight.appendChild(document.createTextNode("cdr3"));
} }
div_highlight.appendChild(cdr3Checkbox)
div_highlight.appendChild(document.createTextNode("cdr3"));
var windowCheckbox = document.createElement('input'); var windowCheckbox = document.createElement('input');
windowCheckbox.type = "checkbox"; windowCheckbox.type = "checkbox";
...@@ -198,15 +211,6 @@ Segment.prototype = { ...@@ -198,15 +211,6 @@ Segment.prototype = {
} }
div_highlight.appendChild(windowCheckbox) div_highlight.appendChild(windowCheckbox)
div_highlight.appendChild(document.createTextNode("vidjil_w")); div_highlight.appendChild(document.createTextNode("vidjil_w"));
var aaCheckbox = document.createElement('input');
aaCheckbox.type = "checkbox";
aaCheckbox.onclick = function () {
segment.amino = this.checked;
segment.update();
}
div_highlight.appendChild(aaCheckbox)
div_highlight.appendChild(document.createTextNode("AA"));
div.appendChild(div_highlight) div.appendChild(div_highlight)
......
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