Commit 5e5581f3 authored by Caillat Michel's avatar Caillat Michel
Browse files

Refactoring and revamped the action triggered by the clear button

parent 5647e140
......@@ -193,11 +193,18 @@ class ContoursGUI {
console.log("connect : entering");
this.contoursViewer = contoursViewer;
this.update_contours.click(this.queryYAFITSContours.bind(this));
this.clear_contours.click(this.contoursViewer.clear.bind(this.contoursViewer));
//this.clear_contours.click(this.contoursViewer.clear.bind(this.contoursViewer));
this.clear_contours.click(this.clear.bind(this));
this.sliceViewer = sliceViewer;
console.log("connect : exting");
}
clear() {
this.text_of_quantiles.val("");
this.levels.val("");
this.contoursViewer.clear();
}
drawThings() {
console.log("drawThings: entering");
this.drawHistogram();
......@@ -392,20 +399,6 @@ class ContoursGUI {
return result;
}
// parseNumberOfBins () {
// let result = false;
// let text = this.number_of_bins.val();
// console.log("--->"+text);
// let x = parseInt(text);
// if (!isNaN(x) && x > 0) {
// result = Math.min(x, 10);
// }
// else {
// alert("Invalid value to express a number of bins. Must a positif integer smaller that 10");
// }
// return result;
// }
queryYAFITSContours() {
console.log("queryYAFITSContours : entering");
document.getElementById('loading').style.display="block";
......@@ -438,20 +431,6 @@ class ContoursGUI {
}
break;
// casequantileserOfBins":
// if (this.hasNumberOfBinsDefined()) {
// let numberOfBins = this.parseNumberOfBins();
// console.log(numberOfBins);
// if (numberOfBins) {
// postParams = {'relFITSFilePath': relFITSFilePath, 'optParams': JSON.stringify({'iFREQ':iFREQ, 'numberOfBins': numberOfBins}, 0, 4)}
// }
// }
// break;
//
// case "histBinsMethod":
// postParams = {'relFITSFilePath': relFITSFilePath, 'optParams': JSON.stringify({'iFREQ':iFREQ, 'histBinsMethod': this.histBinsMethodName}, 0, 4)}
// break;
default:
alert("No contours method defined");
}
......
Supports Markdown
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