Commit 3f3d5e4d authored by Maxime Chazalviel's avatar Maxime Chazalviel

add glyph after collapse

parent b87d72b8
......@@ -295,6 +295,16 @@ Ext.define('metExploreViz.view.panel.viz.VizController', {
iconCls: "neighboursCollapse",
handler: function () {
theNode.hide();
var allMetabolites = metExploreD3.GraphNode.reactionsNeighbours[theNode.getDbIdentifier()].substrates.concat(metExploreD3.GraphNode.reactionsNeighbours[theNode.getDbIdentifier()].products);
allMetabolites.forEach(function (n) {
if(n.isVisited()){
if(n.nbHidden)
metExploreD3.GraphNode.addNbHidden(n, n.nbHidden+1);
else metExploreD3.GraphNode.addNbHidden(n, 1);
}
});
metExploreD3.GraphNetwork.hideIsolatedNodes("viz");
metExploreD3.GraphNetwork.updateNetwork("viz", _metExploreViz.getSessionById("viz"));
}
......
......@@ -174,6 +174,8 @@ metExploreD3.GraphNode = {
},
addNbHidden : function(m, nbHidden){
m.nbHidden=nbHidden;
d3.select("#viz").select("#D3viz").selectAll("g.node").filter(n=>m==n)
.append("svg:text")
.attr('class', 'nbHidden')
......@@ -437,6 +439,8 @@ metExploreD3.GraphNode = {
}
};
});
d3.select("#viz").select("#D3viz").selectAll("g.node").filter(n=>node==n)
.selectAll('.nbHidden').remove();
//update display
metExploreD3.GraphNetwork.hideIsolatedNodes("viz");
metExploreD3.GraphNetwork.updateNetwork("viz", _metExploreViz.getSessionById("viz"));
......
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