From cf5d50bd942a07e27275e42fb3db74e1dc8aea59 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Sun, 3 May 2015 19:34:27 +0300 Subject: view/graph_view: add helper center_on_selection_related --- src/client/view/graph_view.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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) { -- cgit v1.3.1