Commit f400345c authored by Clement Frainay's avatar Clement Frainay

Change collapse behavior ~ node type

collapse can be done only on non-visited reaction, hidding the collapsed node. visited metabolites can be "unvisited" (same behavior as previous "collapse"). Reaction can't be expanded
parent 2f05bb46
......@@ -260,14 +260,14 @@ Ext.define('metExploreViz.view.panel.viz.VizController', {
}
}, {
text: 'Expand all',
hidden: false,
hidden: theNode.getBiologicalType()!=="metabolite",
iconCls: "neighbours",
handler: function () {
metExploreD3.GraphNode.showNeighbours(theNode);
}
},{
text: 'Expand',
hidden: false,
hidden: theNode.getBiologicalType()!=="metabolite",
iconCls: "neighbours",
menu: [{
text: 'Successor',
......@@ -283,12 +283,20 @@ Ext.define('metExploreViz.view.panel.viz.VizController', {
}
}]
}, {
text: 'Collapse',
hidden: false,
text: 'Unvisit',
hidden: !theNode.isVisited() || theNode.getBiologicalType()!=="metabolite",
iconCls: "neighboursCollapse",
handler: function () {
metExploreD3.GraphNode.hideNeighbours(theNode);
}
}, {
text: 'Collapse',
hidden: theNode.isVisited() || theNode.getBiologicalType()==="metabolite",
iconCls: "neighboursCollapse",
handler: function () {
theNode.hide();
metExploreD3.GraphNetwork.updateNetwork("viz", _metExploreViz.getSessionById("viz"));
}
}, {
text: 'Remove',
hidden: false,
......
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