Commit 50fcc605 authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Fix hide noise button bad value on sort contigs

parent 81d5896e
......@@ -98,7 +98,7 @@ d3.boxplot.init = function (id_res=null, from_file=false) {
}
};
d3.boxplot.launch = function(res, update=false) {
d3.boxplot.launch = function(res, update=false, noise_change=false) {
dgenies.fill_select_zones(res["x_order"], res["y_order"]);
if (res["sorted"]) {
$("input#sort-contigs").val("Undo sort");
......@@ -124,6 +124,10 @@ d3.boxplot.launch = function(res, update=false) {
d3.boxplot.min_idy = res["min_idy"];
d3.boxplot.max_idy = res["max_idy"];
d3.boxplot.limit_idy = res["limit_idy"];
if (!noise_change) {
dgenies.noise = true;
}
$("#hide-noise").val(dgenies.noise ? "Hide noise" : "Show noise");
d3.boxplot.draw(res["x_contigs"], res["x_order"], res["y_contigs"], res["y_order"]);
if (!update) {
$("div#draw").resizable({
......
......@@ -96,10 +96,9 @@ dgenies.result.controls.launch_hide_noise = function () {
function (data) {
if (data["success"]) {
dgenies.noise = !dgenies.noise;
$("#hide-noise").val(dgenies.noise ? "Hide noise" : "Show noise");
dgenies.reset_loading_message();
window.setTimeout(() => {
d3.boxplot.launch(data, true);
d3.boxplot.launch(data, true, true);
}, 0);
}
else {
......
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