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

Add refresh button

parent 477edff8
......@@ -260,11 +260,27 @@ Ext.define('metExploreViz.view.form.fluxMappingForm.FluxMappingForm', {
},
{
xtype: 'button',
html: 'Display',
width: '100%',
margin: '15 5 5 5',
reference: 'runFluxVizu'
xtype: 'panel',
layout: {
type: 'hbox'
},
items: [
{
xtype: 'button',
html: 'Display',
width: '75%',
margin: '5 5 5 5',
reference: 'runFluxVizu'
},
{
xtype: 'button',
html: 'Refresh',
width: '25%',
margin: '5 5 5 5',
reference: 'runNewParams',
disabled: true
}
]
},
{
......
......@@ -91,6 +91,7 @@ Ext.define('metExploreViz.view.form.fluxMappingForm.FluxMappingFormController',
var label = view.lookupReference('selectLabelDisplayed').getValue();
metExploreD3.GraphFlux.addValueOnEdge(size, label);
}
view.lookupReference('runNewParams').enable();
view.lookupReference('runFluxVizu').setText("Remove display");
}
}
......@@ -104,12 +105,49 @@ Ext.define('metExploreViz.view.form.fluxMappingForm.FluxMappingFormController',
metExploreD3.GraphFlux.removeGraphDistrib();
metExploreD3.GraphFlux.removeValueOnEdge();
view.lookupReference('runNewParams').disable();
view.lookupReference('runFluxVizu').setText("Display");
}
}
});
view.lookupReference('runNewParams').on({
click: function(){
metExploreD3.GraphStyleEdition.fluxPath1 = false;
metExploreD3.GraphStyleEdition.fluxPath2 = false;
metExploreD3.GraphLink.tick('viz');
metExploreD3.GraphCaption.drawCaption();
metExploreD3.GraphFlux.restoreStyles(_metExploreViz.linkStyle);
metExploreD3.GraphFlux.removeGraphDistrib();
metExploreD3.GraphFlux.removeValueOnEdge();
var selectedFile = view.lookupReference('selectFile').getValue();
var nbColSelect = view.lookupReference('selectColNumber').getValue();
var condSelect = view.lookupReference('selectConditionFlux').getValue();
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('addValueNetwork').on({
change: function(){
if (metExploreD3.GraphStyleEdition.fluxPath1 === true || metExploreD3.GraphStyleEdition.fluxPath2 === true){
......
......@@ -1235,7 +1235,7 @@ metExploreD3.GraphFlux = {
var interLinePos = {x1: posDistrib["inter"], x2: posDistrib["inter"], y1: 0, y2: 340};
var margin = {top: 30, right: 30, bottom: 80, left: 50},
width = 400 - margin.left - margin.right,
width = 460 - margin.left - margin.right,
height = 450 - margin.top - margin.bottom;
var svg = d3.select("#graphDistrib")
......
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