Commit b294986e authored by Jean-Clement Gallardo's avatar Jean-Clement Gallardo
Browse files

Bug fix condition selection and display

parent bc9d639a
...@@ -235,21 +235,22 @@ Ext.define('metExploreViz.view.form.fluxMappingForm.FluxMappingFormController', ...@@ -235,21 +235,22 @@ Ext.define('metExploreViz.view.form.fluxMappingForm.FluxMappingFormController',
if (nbCol === "two"){ if (nbCol === "two"){
var condSplit = [condSelect, condSelect2]; var condSplit = [condSelect, condSelect2];
var indexCond = []; var indexCond1;
var indexCond2;
for (var i = 0; i < fluxCond.length; i++){ for (var i = 0; i < fluxCond.length; i++){
condSplit.forEach(function(cond){ if (condSplit[0] === fluxCond[i]){
if (cond === fluxCond[i]){ indexCond1 = i+1;
indexCond.push(i+1); }
} if (condSplit[1] === fluxCond[i]){
}); indexCond2 = i+1;
}
} }
for (var i = 0; i < fluxData.length; i++){ for (var i = 0; i < fluxData.length; i++){
var data = []; var data = [];
data.push(fluxData[i][0]); data.push(fluxData[i][0]);
indexCond.forEach(function(index){ data.push(fluxData[i][indexCond1]);
data.push(fluxData[i][index]); data.push(fluxData[i][indexCond2]);
});
conData.push(data); conData.push(data);
} }
} }
......
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