Update modular_graph_and_candidates.py
Browse files
modular_graph_and_candidates.py
CHANGED
|
@@ -962,12 +962,13 @@ svg.call(zoomBehavior);
|
|
| 962 |
|
| 963 |
svg.on("click", function(event) {
|
| 964 |
if (event.target.tagName === "svg") {
|
| 965 |
-
node.style("opacity", 1);
|
| 966 |
link.style("opacity", 1);
|
| 967 |
g.selectAll(".node-label").style("opacity", 1);
|
| 968 |
}
|
| 969 |
});
|
| 970 |
|
|
|
|
| 971 |
const g = svg.append('g');
|
| 972 |
|
| 973 |
// Time scale for chronological positioning with much wider spread
|
|
@@ -1065,10 +1066,11 @@ node.on("click", function(event, d) {
|
|
| 1065 |
// Stop click from bubbling up to svg
|
| 1066 |
event.stopPropagation();
|
| 1067 |
|
|
|
|
|
|
|
| 1068 |
node.select("circle").style("opacity", o => isConnected(d, o) ? 1 : 0.1);
|
|
|
|
| 1069 |
link.style("opacity", o => (o.source.id === d.id || o.target.id === d.id) ? 1 : 0.1);
|
| 1070 |
-
node.select("circle").style("opacity", 1);
|
| 1071 |
-
g.selectAll(".node-label").style("opacity", 1);
|
| 1072 |
});
|
| 1073 |
|
| 1074 |
const baseSel = node.filter(d => d.cls === 'base');
|
|
|
|
| 962 |
|
| 963 |
svg.on("click", function(event) {
|
| 964 |
if (event.target.tagName === "svg") {
|
| 965 |
+
node.select("circle").style("opacity", 1);
|
| 966 |
link.style("opacity", 1);
|
| 967 |
g.selectAll(".node-label").style("opacity", 1);
|
| 968 |
}
|
| 969 |
});
|
| 970 |
|
| 971 |
+
|
| 972 |
const g = svg.append('g');
|
| 973 |
|
| 974 |
// Time scale for chronological positioning with much wider spread
|
|
|
|
| 1066 |
// Stop click from bubbling up to svg
|
| 1067 |
event.stopPropagation();
|
| 1068 |
|
| 1069 |
+
node.on("click", function(event, d) {
|
| 1070 |
+
event.stopPropagation();
|
| 1071 |
node.select("circle").style("opacity", o => isConnected(d, o) ? 1 : 0.1);
|
| 1072 |
+
g.selectAll(".node-label").style("opacity", o => isConnected(d, o) ? 1 : 0.1);
|
| 1073 |
link.style("opacity", o => (o.source.id === d.id || o.target.id === d.id) ? 1 : 0.1);
|
|
|
|
|
|
|
| 1074 |
});
|
| 1075 |
|
| 1076 |
const baseSel = node.filter(d => d.cls === 'base');
|