Skip to content

Commit

Permalink
Fixed autoGate to update slider box
Browse files Browse the repository at this point in the history
  • Loading branch information
nchuynh committed Oct 6, 2023
1 parent cfeefac commit b56b78f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions minerva_analysis/client/src/js/views/csvGatingList.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,13 @@ class CSVGatingList {
const transformed = this.dataLayer.isTransformed();
const gate = transformed ? parseFloat(input) : parseInt(input);
if (fullName in this.selections) {
const channelID = this.gatingIDs[shortName];
const gate_end = this.selections[fullName][1];
const slider = this.sliders.get(shortName);
const values = [gate, gate_end];
this.moveSliderHandles(slider, values, shortName, 'GATING_BRUSH_END');
d3.select('#gating_slider-input_' + channelID + '_0').attr('value', gate)
d3.select('#gating_slider-input_' + channelID + '_0').property('value', gate);
}
}

Expand Down Expand Up @@ -589,10 +592,10 @@ class CSVGatingList {
const transformed = this.dataLayer.isTransformed();
const v0 = transformed ? range[0] : Math.round(range[0]);
const v1 = transformed ? range[1] : Math.round(range[1]);
d3.select('#gating_slider-input' + channelID + 0).attr('value', v0)
d3.select('#gating_slider-input' + channelID + 0).property('value', v0);
d3.select('#gating_slider-input' + channelID + 1).attr('value', v1);
d3.select('#gating_slider-input' + channelID + 1).property('value', v1);
d3.select('#gating_slider-input_' + channelID + '_0').attr('value', v0)
d3.select('#gating_slider-input_' + channelID + '_0').property('value', v0);
d3.select('#gating_slider-input_' + channelID + '_1').attr('value', v1);
d3.select('#gating_slider-input_' + channelID + '_1').property('value', v1);
this.moveSliderHandles(sliderSimple, [v0, v1], name, "GATING_BRUSH_MOVE");
});

Expand Down Expand Up @@ -653,7 +656,7 @@ class CSVGatingList {
.style('background', 'none')
.append('input')
.attr( 'y', -17)
.attr('id', 'gating_slider-input' + channelID + i)
.attr('id', 'gating_slider-input_' + channelID + '_' + i)
.attr('type', 'text')
.attr('class', 'input')
.attr('value', () => {
Expand Down

0 comments on commit b56b78f

Please sign in to comment.