Commit 8b3f764f authored by Maxime Chazalviel's avatar Maxime Chazalviel

Highlight visited reactions on links

parent 3f3d5e4d
......@@ -610,6 +610,14 @@ metExploreD3.GraphCaption = {
return size*i;
})
})
d3.select("#viz" ).select("#D3viz").select("#graphComponent").selectAll("path.link.reaction")
.filter(function(l){
return l.getSource().isVisited() && l.getTarget().isVisited();
})
.classed("visited", true)
.style("stroke-width", 6);
});
},
......
......@@ -613,6 +613,13 @@ metExploreD3.GraphLink = {
if(metExploreD3.getGeneralStyle().isDisplayedPathwaysOnLinks())
metExploreD3.GraphCaption.majCaptionPathwayOnLink();
d3.select("#viz" ).select("#D3viz").select("#graphComponent").selectAll("path.link.reaction")
.filter(function(l){
return l.getSource().isVisited() && l.getTarget().isVisited();
})
.classed("visited", true)
.style("stroke-width", 6);
},
/*******************************************
......
......@@ -175,7 +175,8 @@ metExploreD3.GraphNode = {
addNbHidden : function(m, nbHidden){
m.nbHidden=nbHidden;
d3.select("#viz").select("#D3viz").selectAll("g.node").filter(n=>m==n)
.selectAll('.nbHidden').remove();
d3.select("#viz").select("#D3viz").selectAll("g.node").filter(n=>m==n)
.append("svg:text")
.attr('class', 'nbHidden')
......@@ -2669,7 +2670,7 @@ metExploreD3.GraphNode = {
}
}
var links = d3.select("#" + parent).select("#D3viz").select("#graphComponent").selectAll("path.link.reaction");
var links = d3.select("#" + parent).select("#D3viz").select("#graphComponent").selectAll("path.link.reaction:not(.visited)");
if (d.getBiologicalType() == "reaction") {
......@@ -2869,7 +2870,7 @@ metExploreD3.GraphNode = {
var linkStyle = metExploreD3.getLinkStyle();
d3.select("#" + parent).select("#D3viz").select("#graphComponent")
.selectAll("path.link.reaction")
.selectAll("path.link.reaction:not(.visited)")
.filter(function (link) {
return d.getId() == link.getSource().getId() || d.getId() == link.getTarget().getId();
})
......
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