Commit 47cd25ee authored by marc duez's avatar marc duez

segmenter.js : attach listener to the checkbox value instead of the click event

a checkbox can be changed without clicking on it  and we want to catch those changes 
parent 5c97f86f
......@@ -275,17 +275,17 @@ Segment.prototype = {
var input = document.createElement('input');
input.type = 'checkbox';
input.id = 'vdj_input_check';
$(input).on("click", function() {
if(this.checked) {
self.highlight[0].field = "cdr3";
self.highlight[0].color = "red";
input.addEventListener('change', (event) => {
if (event.target.checked) {
self.highlight[0].field = "cdr3"
self.highlight[0].color = "red"
} else {
self.highlight[0].field = "";
self.highlight[0].field = ""
}
self.update();
self.update()
})
});
var label = document.createElement('label');
label.setAttribute("for", 'vdj_input_check');
label.innerHTML = 'CDR3';
......
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