diff --git a/docs/BatchcodeCombinationSelection.js b/docs/BatchcodeCombinationSelection.js index 5c18d995489..6a065e5403e 100644 --- a/docs/BatchcodeCombinationSelection.js +++ b/docs/BatchcodeCombinationSelection.js @@ -1,6 +1,6 @@ class BatchcodeCombinationSelection { - getSelectBatchcodeCombination({ histograms, onSelect }) { + static getSelectBatchcodeCombination({ histograms, onSelect }) { const selectBatchcodeCombination = UIUtils.instantiateTemplate('template-selectBatchcodeCombination'); const batchcodesSelect = selectBatchcodeCombination.querySelector('#batchcodesSelect'); this.#addBatchcodeCombinationOptions(batchcodesSelect, histograms); @@ -13,15 +13,15 @@ class BatchcodeCombinationSelection { return selectBatchcodeCombination; } - #addBatchcodeCombinationOptions(batchcodesSelect, histograms) { + static #addBatchcodeCombinationOptions(batchcodesSelect, histograms) { this.#getBatchcodeCombinationOptions(histograms).forEach(option => batchcodesSelect.add(option)); } - #getBatchcodeCombinationOptions(histograms) { + static #getBatchcodeCombinationOptions(histograms) { return histograms.map(this.#getBatchcodeCombinationOption); } - #getBatchcodeCombinationOption(histoDescr, index) { + static #getBatchcodeCombinationOption(histoDescr, index) { const option = document.createElement("option"); option.text = histoDescr.batchcodes.join(', '); option.value = index; diff --git a/docs/HistogramView.js b/docs/HistogramView.js index 628e29c5b07..e77575db19a 100644 --- a/docs/HistogramView.js +++ b/docs/HistogramView.js @@ -36,7 +36,7 @@ class HistogramView { #displaySelectBatchcodeCombination(histograms, histogramChartView, chartWithSlider) { const selectBatchcodeCombination = - new BatchcodeCombinationSelection().getSelectBatchcodeCombination( + BatchcodeCombinationSelection.getSelectBatchcodeCombination( { histograms: histograms, onSelect: histoDescr => this.#displayHistogram(histoDescr, histogramChartView, chartWithSlider)