From 3b6bcd0ddef7077cc894a57597d09bf885a6bef3 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Tue, 12 May 2015 13:32:24 +0300 Subject: client/view/activity: add hover highlight of links and nodes" --- src/client/view/activity.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/client/view/activity.js') diff --git a/src/client/view/activity.js b/src/client/view/activity.js index 53706c06..4457a47f 100644 --- a/src/client/view/activity.js +++ b/src/client/view/activity.js @@ -4,13 +4,15 @@ function($, _, Bacon, selection) { var incomingActivityBus = new Bacon.Bus(), activity_element, graph_view_element, + graph_view, graph; -function init(_graph, _graph_view_element) +function init(_graph, _graph_view, _graph_view_element) { activity_element = $('
'); graph_view_element = _graph_view_element; graph_view_element.append(activity_element); + graph_view = _graph_view; graph = _graph; } @@ -105,6 +107,13 @@ function appendActivity(diff) (event.shiftKey ? selection.invert_both : selection.select_both) (affected_nodes, affected_links); }); + new_div.hover(function (e) { + _.each(affected_nodes, graph_view.node__hover__start); + _.each(affected_links, graph_view.link__hover__start); + }, function (e) { + _.each(affected_nodes, graph_view.node__hover__end); + _.each(affected_links, graph_view.link__hover__end); + }); // TODO - x button // TODO - format of text per activity (topo/attr) // TODO - user data (requires protocol update?) -- cgit v1.3.1