diff options
| author | Alon Levy <alon@pobox.com> | 2015-01-21 14:51:21 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-01-21 14:52:10 +0200 |
| commit | de731590ada4db90749a01b61b81774b91867696 (patch) | |
| tree | 614650d9c36a870997db2df43a94ce9d7fb3d3f5 /src/client/view/graph_view.js | |
| parent | 37580fcafdc94c55e880a989dc7103e97ed9edd2 (diff) | |
Fixes #294 - make selection ignore temporary nodes (bad implementation)
Should have two functions for node+link class setting, one for
temporary, one for not, instead of passing this constant (since
construction time) value along.
Diffstat (limited to 'src/client/view/graph_view.js')
| -rw-r--r-- | src/client/view/graph_view.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js index f8180495..0b336e64 100644 --- a/src/client/view/graph_view.js +++ b/src/client/view/graph_view.js @@ -263,12 +263,12 @@ function GraphView(spec) { link.attr("class", function(d, i){ var temp_and = (d.name && d.name.replace(/ /g,"")=="and" && temporary) ? "temp_and" : ""; - return ["graph link", temp_and, selection.selected_class__link(d)].join(' '); + return ["graph link", temp_and, selection.selected_class__link(d, temporary)].join(' '); }); link.selectAll('path.link') .attr('class', function(d) { - return [d.state || "perm", selection.selected_class__link(d), "link graph"].join(' '); + return [d.state || "perm", selection.selected_class__link(d, temporary), "link graph"].join(' '); }); link.exit().remove(); @@ -307,7 +307,7 @@ function GraphView(spec) { } }) .attr("class", function(d) { - return ["linklabel graph", selection.selected_class__link(d)].join(' '); + return ["linklabel graph", selection.selected_class__link(d, temporary)].join(' '); }); linktext.exit().remove(); @@ -324,7 +324,7 @@ function GraphView(spec) { .call(drag); node.attr('class', function(d) { - return ['node', selection.selected_class__node(d)].join(' '); + return ['node', selection.selected_class__node(d, temporary)].join(' '); }); // reorder nodes so selected are last, and so rendered last, and so on top. // FIXME: with b-ubble removed this is probably broken. actually also before. links are not correctly ordered. @@ -696,5 +696,5 @@ function GraphView(spec) { return { GraphView: GraphView, }; - + }); |
