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

Bug fix display button + None possibility for label value display on network

parent e8ab08a5
......@@ -240,7 +240,8 @@ Ext.define('metExploreViz.view.form.fluxMappingForm.FluxMappingForm', {
data: [
{"labels":"Reaction Name"},
{"labels":"Reaction ID"},
{"labels":"Reaction DB ID"}
{"labels":"Reaction DB ID"},
{"labels":"None"}
]
},
xtype: 'combobox',
......
......@@ -73,24 +73,26 @@ Ext.define('metExploreViz.view.form.fluxMappingForm.FluxMappingFormController',
var nbColSelect = view.lookupReference('selectColNumber').getValue();
var condSelect = view.lookupReference('selectConditionFlux').getValue();
if (nbColSelect === "one"){
var color = document.getElementById("html5colorpickerFlux1").value;
metExploreD3.GraphStyleEdition.fluxPath1 = true;
me.computeFlux(selectedFile, nbColSelect, condSelect, "null", color);
if (selectedFile !== null && nbColSelect !== null && condSelect !== null){
if (nbColSelect === "one"){
var color = document.getElementById("html5colorpickerFlux1").value;
metExploreD3.GraphStyleEdition.fluxPath1 = true;
me.computeFlux(selectedFile, nbColSelect, condSelect, "null", color);
}
if (nbColSelect === "two"){
var color = [document.getElementById("html5colorpickerFlux1").value,
document.getElementById("html5colorpickerFlux2").value];
metExploreD3.GraphStyleEdition.fluxPath2 = true;
var condSelect2 = view.lookupReference('selectConditionFlux2').getValue();
me.computeFlux(selectedFile, nbColSelect, condSelect, condSelect2, color);
}
if (view.lookupReference('addValueNetwork').getValue() === true){
var size = view.lookupReference('fontSize').getValue();
var label = view.lookupReference('selectLabelDisplayed').getValue();
metExploreD3.GraphFlux.addValueOnEdge(size, label);
}
view.lookupReference('runFluxVizu').setText("Remove display");
}
if (nbColSelect === "two"){
var color = [document.getElementById("html5colorpickerFlux1").value,
document.getElementById("html5colorpickerFlux2").value];
metExploreD3.GraphStyleEdition.fluxPath2 = true;
var condSelect2 = view.lookupReference('selectConditionFlux2').getValue();
me.computeFlux(selectedFile, nbColSelect, condSelect, condSelect2, color);
}
if (view.lookupReference('addValueNetwork').getValue() === true){
var size = view.lookupReference('fontSize').getValue();
var label = view.lookupReference('selectLabelDisplayed').getValue();
metExploreD3.GraphFlux.addValueOnEdge(size, label);
}
view.lookupReference('runFluxVizu').setText("Remove display");
}
else{
......@@ -151,7 +153,7 @@ Ext.define('metExploreViz.view.form.fluxMappingForm.FluxMappingFormController',
}
}
}
})
});
},
colParse: function(nbCol, selectedFile){
......
......@@ -1629,13 +1629,16 @@ metExploreD3.GraphFlux = {
reactions.each(function(react){
if (label === "Reaction Name"){
var textLabel = react.name;
var textLabel = react.name+" : ";
}
if (label === "Reaction ID"){
var textLabel = react.id;
var textLabel = react.id+" : ";
}
if (label === "Reaction DB ID"){
var textLabel = react.dbIdentifier;
var textLabel = react.dbIdentifier+" : ";
}
if (label === "None"){
var textLabel = "";
}
if (react.axe === "horizontal"){
......@@ -1654,7 +1657,7 @@ metExploreD3.GraphFlux = {
.attr("fill", react.color1)
.attr("font-size", size)
.classed("valueLabel", true)
.text(textLabel+" : "+react.valueCond1)
.text(textLabel+react.valueCond1)
.call(labelDrag);
}
if (react.valueCond2 !== undefined && react.valueCond1 !== undefined){
......@@ -1670,14 +1673,14 @@ metExploreD3.GraphFlux = {
.attr("y", posY)
.attr("font-size", size)
.classed("valueLabel", true)
.text(textLabel+" : "+react.valueCond1);
.text(textLabel+react.valueCond1);
valueLabel.append("text")
.attr("fill", react.color2)
.attr("x", posX)
.attr("y", posY+15)
.attr("font-size", size)
.classed("valueLabel", true)
.text(textLabel+" : "+react.valueCond2);
.text(textLabel+react.valueCond2);
}
});
},
......
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