diff options
| author | Alon Levy <alon@pobox.com> | 2015-03-04 01:02:22 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-03-04 01:02:22 +0200 |
| commit | d21464f4b8063945e7657e71832c1b4c3e5b9e86 (patch) | |
| tree | 7f3d60e81938af5d5834222c1854ebb96b4047f3 /src/client/view/graph_view.js | |
| parent | b9d14b315671246f181f5dc0c1c47398819761b4 (diff) | |
client:selection: invert on shift
Diffstat (limited to 'src/client/view/graph_view.js')
| -rw-r--r-- | src/client/view/graph_view.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js index 32540bea..ff7de845 100644 --- a/src/client/view/graph_view.js +++ b/src/client/view/graph_view.js @@ -288,7 +288,7 @@ function GraphView(spec) { graph.links__delete([that.link.id]); }); view.edge_info.show(d); - selection.update([src, dst], d3.event.shiftKey); + (d3.event.shiftKey? selection.invert : selection.update)([src, dst]); }); link.attr("class", function(d, i){ @@ -421,7 +421,7 @@ function GraphView(spec) { } if (!temporary) { svgInput.enable(this, d, nodeTextX(d)); - selection.update([d], d3.event.shiftKey); + (d3.event.shiftKey ? selection.invert : selection.update)([d]); showNodeInfo(graph.find_node__by_id(this.parentNode.id)); } d3.event.stopPropagation(); @@ -484,7 +484,7 @@ function GraphView(spec) { return; } d3.event.stopPropagation(); - selection.update([d], d3.event.shiftKey); + (d3.event.shiftKey ? selection.invert : selection.update)([d]); if(!temporary) { showNodeInfo(d); } |
