summaryrefslogtreecommitdiff
path: root/src/client/view/selection.js
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2015-03-01 00:11:06 +0200
committerAlon Levy <alon@pobox.com>2015-03-01 00:11:06 +0200
commite379c82a3c12ef443b03d224f5248d0c829bd004 (patch)
tree92d18ff9993d72894e98ad57d963262f9f28ad2c /src/client/view/selection.js
parente62d4f4620f40b15f396cddf9b317de2d53c10ea (diff)
client/selection: make sure selection is visible
Diffstat (limited to 'src/client/view/selection.js')
-rw-r--r--src/client/view/selection.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/client/view/selection.js b/src/client/view/selection.js
index f6082d8b..fa8e1cf4 100644
--- a/src/client/view/selection.js
+++ b/src/client/view/selection.js
@@ -35,14 +35,24 @@ function new_selection(nodes, root_nodes)
return ret;
}
-function get_main_graph()
+function get_rz_core()
{
// circular dependency on rz_core, so require.js cannot solve it.
if (rz_core === undefined) {
rz_core = require('rz_core');
listen_on_diff_bus(rz_core.main_graph.diffBus);
}
- return rz_core.main_graph;
+ return rz_core;
+}
+
+function get_main_graph()
+{
+ return get_rz_core().main_graph;
+}
+
+function get_main_graph_view()
+{
+ return get_rz_core().main_graph_view;
}
var root_nodes = [], // these are the nodes that are requested via update
@@ -198,6 +208,7 @@ var inner_update = function(nodes)
clear();
root_nodes = nodes;
root_nodes__by_id = nodes_to_id_dict(nodes);
+ get_main_graph_view().nodes__user_visible(nodes);
connectedComponent(nodes);
}