Commit cc3f1666 authored by Maxime Chazalviel's avatar Maxime Chazalviel

filter for big centrality & display nbof hidden nodes

parent 03beb808
......@@ -60,7 +60,9 @@ metExploreD3.GraphNetwork = {
if(anim){
if(alpha!==undefined){
if(session.getD3Data().getNodes().length>1000){
if(session.getD3Data().getNodes().filter(function (node) {
return !node.isHidden();
}).length>1000){
if(session.isAnimated()){
if(alpha>0.06){
......@@ -76,7 +78,6 @@ metExploreD3.GraphNetwork = {
}
}
}
}
// Control if the user can see all the graph
......@@ -181,7 +182,7 @@ metExploreD3.GraphNetwork = {
// if visualisation is actived we add item to menu
if(session.isActive()){
if(sessionLinked.getD3Data().getNodes().length>1000){
if(sessionLinked.getD3Data().getNodes().filter(function (node) { return !node.isHidden(); }).length>1000){
d3.select("#"+panelLinked).selectAll("path.link").remove();
if(metExploreD3.GraphNetwork.taskZoom)
metExploreD3.stopTask(metExploreD3.GraphNetwork.taskZoom);
......@@ -3072,8 +3073,8 @@ metExploreD3.GraphNetwork = {
// A BOUGER /////////
d3.selectAll("g.node").filter(n=>n.getBiologicalType()==="reaction").each(function(r){
d3.select(this).select("text").style("opacity", 0)
})
});
var linkStyle = metExploreD3.getLinkStyle();
metExploreD3.GraphLink.refreshDataLink(panelLinked, sessionLinked);
......
This diff is collapsed.
......@@ -795,31 +795,6 @@ metExploreD3.GraphPanel = {
}
if(_metExploreViz.getMappingsLength()>0 && key=="viz" && !metExploreD3.getGeneralStyle().windowsAlertIsDisable())
{
metExploreD3.displayMessageYesNo("Mapping",'Do you want keep mappings.',function(btn){
if(btn=="yes")
{
_metExploreViz.getMappingsSet().forEach(function(mapping){
metExploreD3.GraphMapping.reloadMapping(mapping);
metExploreD3.fireEventArg('selectMappingVisu', "jsonmapping", mapping);
});
metExploreD3.fireEventArg('buttonRefresh', "reloadMapping", true);
}
else
{
metExploreD3.fireEventArg('buttonMap', "reloadMapping", false);
metExploreD3.fireEventArg('buttonRefresh', "reloadMapping", false);
metExploreD3.fireEventArg('selectConditionForm', "closeMapping", _metExploreViz.getActiveMapping);
_metExploreViz.resetMappings();
// metExploreD3.fireEventArg('buttonRefresh', "reloadMapping", false);
// metExploreD3.fireEventArg('buttonRefresh', "reloadMapping", false);
// metExploreD3.fireEvent('selectMappingVisu', "resetMapping");
// _metExploreViz.resetMappings();
}
});
}
if(sessions[key].mapped)
{
......@@ -861,7 +836,16 @@ metExploreD3.GraphPanel = {
metExploreD3.GraphNetwork.first=true;
metExploreD3.GraphNetwork.refreshSvg(key);
metExploreD3.GraphNetwork.refreshViz(key);
// set style of previous session from JSON
_metExploreViz.getMappingsSet().forEach(function(mapping){
metExploreD3.GraphMapping.reloadMapping(mapping);
metExploreD3.fireEventArg('selectMappingVisu', "jsonmapping", mapping);
});
metExploreD3.fireEventArg('buttonRefresh', "reloadMapping", true);
// set style of previous session from JSON
var networkDataViz = new NetworkData(key);
networkDataViz.cloneObject(sessions[key].d3Data);
var nodesData = networkDataViz.getNodes();
......
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