Maintenance - Mise à jour mensuelle Lundi 6 Avril 2020 entre 7h00 et 9h00

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

Apply style to visit node and reduce strokes

parent 490e30f6
......@@ -271,7 +271,8 @@ Ext.define('metExploreViz.view.panel.viz.VizController', {
hidden: theNode.isVisited() || metExploreD3.GraphNode.getHiddenNeighbours(theNode).length>0,
iconCls: "neighbours",
handler: function () {
theNode.visit();
metExploreD3.GraphNode.visitANode(theNode);
metExploreD3.GraphNetwork.updateNetwork("viz", _metExploreViz.getSessionById("viz"));
}
}, {
text: (theNode.isVisited() ? 'Show more...' : 'Expand...'),
......
......@@ -583,7 +583,7 @@ metExploreD3.GraphCaption = {
.classed("reaction", false)
.classed("pathway", true)
.attr('id', pathw.getName().replace(/[.*+?^${} ()|[\]\-\\]/g, ""))
.style("stroke-width","3px")
.style("stroke-width","2px")
.style("stroke-dasharray", size+","+size*(cols.length-1))
.style("stroke-dashoffset", size*i)
.style("stroke", pathw.getColor());
......@@ -616,7 +616,7 @@ metExploreD3.GraphCaption = {
return l.getSource().isVisited() && l.getTarget().isVisited();
})
.classed("visited", true)
.style("stroke-width", 6);
.style("stroke-width", 4);
});
},
......
......@@ -62,7 +62,7 @@ metExploreD3.GraphLink = {
.classed("pathway", true)
.attr('id', pathw.getName().replace(/[.*+?^${} ()|[\]\-\\]/g, ""))
.classed("hide", true)
.style("stroke-width","3px")
.style("stroke-width","2px")
.style("stroke-dasharray", size+","+size*(cols.length-1))
.style("stroke-dashoffset", size*i)
.style("stroke", pathw.getColor());
......@@ -618,7 +618,7 @@ metExploreD3.GraphLink = {
return l.getSource().isVisited() && l.getTarget().isVisited();
})
.classed("visited", true)
.style("stroke-width", 6);
.style("stroke-width", 4);
},
......
......@@ -89,10 +89,7 @@ metExploreD3.GraphNode = {
select(".stroke").style("stroke-opacity", 0)
},
showNeighbours: function(node){
var threshold = 7;
visitANode : function(node){
var allNodes = d3.select("#viz").select("#D3viz").selectAll("g.node");
var reactionShowable = [];
......@@ -125,6 +122,25 @@ metExploreD3.GraphNode = {
}
});
node.visit();
allNodes.filter(function (d) {
return d.getId()===node.getId();
}).style("fill","black");
node.setLocked(true);
metExploreD3.GraphNode.fixNode(node);
return reactionShowable;
},
showNeighbours: function(node){
var threshold = 7;
var allNodes = d3.select("#viz").select("#D3viz").selectAll("g.node");
var reactionShowable = metExploreD3.GraphNode.visitANode(node);
var reactionToShow = [];
metExploreD3.GraphNode.sortReactionFromMetaboRank(reactionShowable, node);
reactionShowable = reactionShowable.filter(r=>r.isHidden());
......@@ -151,14 +167,7 @@ metExploreD3.GraphNode = {
});
i++;
}
node.visit();
var allNodes = d3.select("#viz").select("#D3viz").selectAll("g.node");
allNodes.filter(function (d) {
return d.getId()===node.getId();
}).style("fill","black");
node.setLocked(true);
metExploreD3.GraphNode.fixNode(node);
if(i<reactionShowable.length){
console.log("Show more");
......
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