summaryrefslogtreecommitdiff
path: root/src/client/view
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2015-05-03 19:34:27 +0300
committerAlon Levy <alon@pobox.com>2015-05-03 19:38:27 +0300
commitcf5d50bd942a07e27275e42fb3db74e1dc8aea59 (patch)
tree34c381cdf06f4bd9348f3357d5b14c181f6d6d5d /src/client/view
parent13f791a8f5b41ba3998b977054cfe7e613f9d82e (diff)
view/graph_view: add helper center_on_selection_related
Diffstat (limited to 'src/client/view')
-rw-r--r--src/client/view/graph_view.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js
index 817dc465..6e09f742 100644
--- a/src/client/view/graph_view.js
+++ b/src/client/view/graph_view.js
@@ -1352,6 +1352,10 @@ function GraphView(spec) {
tick();
});
+ function center_on_selection_related() {
+ nodes__user_visible(selection.related(), true, 100 /* ms, duration of animation */);
+ }
+
gv.link__pass_filter = link__pass_filter;
gv.node__pass_filter = node__pass_filter;
function zen_mode__set(value) {