diff options
| author | Alon Levy <alon@pobox.com> | 2015-04-06 17:03:41 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-04-06 17:03:42 +0300 |
| commit | 85ec8858211db3763782e55735ab0310dcc62203 (patch) | |
| tree | 075a748c04e73e3fce90be5e92e56d0d5219b3a0 /src/client/view/graph_view.js | |
| parent | 1f1de1f80c10fbd29078201e248101c39f0a6e77 (diff) | |
client: graph_view: use display instead of visibility.
SVG 1.1 visibility applies to element and not to children, display otoh does apply to the whole subtree
resolves #401
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 d75e2af9..9bafc620 100644 --- a/src/client/view/graph_view.js +++ b/src/client/view/graph_view.js @@ -576,7 +576,7 @@ function GraphView(spec) { var nodeEnter = node.enter() .append("g") .attr('id', function(d){ return d.id; }) // append node id to enable data->visual mapping - .attr('visibility', 'hidden') // made visible on first tick + .attr('display', 'none') // made visible on first tick .call(drag); node.attr('class', function(d) { @@ -1106,13 +1106,13 @@ function GraphView(spec) { // After initial placement we can make the nodes visible. [node, node_text].forEach(function (list) { - list.attr('visibility', function (d, i) { - return node__is_shown(d) ? 'visible' : 'hidden'; + list.attr('display', function (d, i) { + return node__is_shown(d) ? '' : 'none'; }); }); [link, link_text].forEach(function (list) { - link.attr('visibility', function (d, i) { - return link__is_shown(d) ? 'visible' : 'hidden'; + link.attr('display', function (d, i) { + return link__is_shown(d) ? '' : 'none'; }); }); } |
