From 8745ab5117257d00f222ea31ce032724a2456933 Mon Sep 17 00:00:00 2001 From: Rob Court Date: Wed, 14 Apr 2021 11:04:54 +0100 Subject: [PATCH] Revert "lint fix" This reverts commit 75d884fd3d14e13d9ab36992da87c80fd0262f0c. --- .../interface/VFBCircuitBrowser/Controls.js | 270 +++++++++--------- 1 file changed, 133 insertions(+), 137 deletions(-) diff --git a/components/interface/VFBCircuitBrowser/Controls.js b/components/interface/VFBCircuitBrowser/Controls.js index 9d5e90119..5acd836fe 100644 --- a/components/interface/VFBCircuitBrowser/Controls.js +++ b/components/interface/VFBCircuitBrowser/Controls.js @@ -272,9 +272,7 @@ class Controls extends Component { // Copy neurons and add selection to correct array index let neurons = this.state.neuronFields; let shortForm = this.state.filteredResults?.[value].short_form; - let index = neurons.findIndex(neuron => { - return neuron.id === shortForm; - }); + let index = neurons.findIndex((neuron) => neuron.id === shortForm); index > -1 ? neurons[index] = { id : shortForm, label : value } : null // Keep track of query selected, and send an event to redux store that circuit has been updated @@ -350,146 +348,144 @@ class Controls extends Component { let addNeuronDisabled = neuronFields.length >= configuration.maxNeurons; return ( - -
-
- - - -
- { this.props.resultsAvailable() - ?
    - { this.props.legend.map((label, index) => ( -
  • {label}
  • - )) - } -
- : null - } - - } - onClick={() => self.setState({ expanded : !expanded })} - classes={{ expanded: classes.expanded }} - IconButtonProps={{ style: { padding : "0px", margin : "0px" } }} - > -
- Configure circuit -
-
- - - -
- - - -
-
- - { neuronFields.map((field, index) => { - let label = "Neuron " + (index + 1) .toString(); - return ( - - - this.state.filteredResults[option].label)} - renderInput={params => ( - - )} - /> - - { deleteIconVisible ? - - - - - : null - } - - ); - })} + +
+
+ + + +
+ { this.props.resultsAvailable() + ?
    + { this.props.legend.map((label, index) => ( +
  • {label}
  • + )) + } +
+ : null + } + + } + onClick={() => self.setState({ expanded : !expanded })} + classes={{ expanded: classes.expanded }} + IconButtonProps={{ style: { padding : "0px", margin : "0px" } }} + > +
+ Configure circuit +
+
+ + + +
+ + + +
+
+ + { neuronFields.map((field, index) => { + let label = "Neuron " + (index + 1) .toString(); + return + + this.state.filteredResults[option].label)} + renderInput={params => ( + + )} + /> + + { deleteIconVisible ? + + + + + : null + } + + })} + + + { addNeuronDisabled + ? null + : + } + +
+
+ + + + + + Hops - - { addNeuronDisabled - ? null - : - } + + - - - - - - - Hops - - - - + + + Weight - - - Weight - - - - - - - + + + + + - -
-
-
- ); +
+ +
+
+
+ ) } }