Commit 85792f59 authored by HERBERT Ryan's avatar HERBERT Ryan

crossDomain.js, segmenter.js CDR3 checkbox

Moved CDR3 checkbox out of devel-mode
parent 5d06f21b
......@@ -217,11 +217,11 @@ function imgtPostForSegmenter(data, system) {
input.id = 'imgt_input_check';
$(input).on("click", function() {
if(this.checked) {
segment.highlight[0].field = "CDR3-IMGT";
segment.highlight[0].color = "red";
segment.highlight[1].field = "CDR3-IMGT";
segment.highlight[1].color = "red";
} else {
segment.highlight[0].field = "";
segment.highlight[1].field = "";
}
segment.update();
......@@ -242,16 +242,16 @@ function imgtPostForSegmenter(data, system) {
input.id = 'imgt_vdj_input_check';
$(input).on("click", function() {
if(this.checked) {
segment.highlight[1].field = "3'V-REGION";
segment.highlight[1].color = "#4b4";
segment.highlight[2].field = "D-REGION";
segment.highlight[2].color = "#b44";
segment.highlight[3].field = "5'J-REGION";
segment.highlight[3].color = "#aa2";
segment.highlight[2].field = "3'V-REGION";
segment.highlight[2].color = "#4b4";
segment.highlight[3].field = "D-REGION";
segment.highlight[3].color = "#b44";
segment.highlight[4].field = "5'J-REGION";
segment.highlight[4].color = "#aa2";
} else {
segment.highlight[1].field = "";
segment.highlight[2].field = "";
segment.highlight[3].field = "";
segment.highlight[4].field = "";
}
segment.update();
......
......@@ -69,6 +69,7 @@ function Segment(id, model) {
//elements to be highlited in sequences
this.highlight = [
{'field' : "", 'color': "red"},
{'field': "", 'color': "orange"},
{'field' : "", 'color': "blue"},
{'field' : "", 'color': "green"},
{'field' : "", 'color': "yellow"}
......@@ -206,8 +207,36 @@ Segment.prototype = {
span = document.createElement("span");
span.id = 'highlightCheckboxes';
if(this.findPotentialField().indexOf('cdr3') != -1) {
var input = document.createElement('input');
input.type = 'checkbox';
input.id = 'vdj_input_check';
$(input).on("click", function() {
if(this.checked) {
segment.highlight[0].field = "CDR3";
segment.highlight[0].color = "red";
} else {
segment.highlight[0].field = "";
}
segment.update();
});
input.click();
var label = document.createElement('label');
label.setAttribute("for", 'vdj_input_check');
label.innerHTML = 'CDR3';
input.setAttribute("title", 'Display CDR3 computed by Vidjil');
label.setAttribute("title", 'Display CDR3 computed by Vidjil');
span.appendChild(input);
span.appendChild(label);
}
div.appendChild(span);
// Checkbox for id
/*
var windowCheckbox = document.createElement('input');
......@@ -348,22 +377,6 @@ Segment.prototype = {
}
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"));
}
return 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