diff options
| author | Alon Levy <alon@pobox.com> | 2015-05-12 13:31:41 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-05-12 13:31:41 +0300 |
| commit | 095e9e86fbb693aaf4dc04744873c9c8b6109270 (patch) | |
| tree | 13a381a0c4c870f02a0e52009777586bf348aa78 /src/client/view/graph_view.js | |
| parent | 3f4c98e95591c4109401fd8c670c4361b9446ce0 (diff) | |
client/view/graph_view: link_hover: don't use this
Diffstat (limited to 'src/client/view/graph_view.js')
| -rw-r--r-- | src/client/view/graph_view.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/client/view/graph_view.js b/src/client/view/graph_view.js index 1d325b5c..36fcce59 100644 --- a/src/client/view/graph_view.js +++ b/src/client/view/graph_view.js @@ -514,26 +514,30 @@ function GraphView(spec) { * @this - the element being hovered on. Could use d.id instead */ var link__hover__start = function (d) { - add_class(this, 'hovering'); + var e = document.getElementById(d.id); + + add_class(e, 'hovering'); // show text if not selected if (!selection.link_related(d)) { - set_link_label_text(this.id, link_text__short(d)); + set_link_label_text(d.id, link_text__short(d)); } } var link__hover__end = function (d) { - remove_class(this, 'hovering'); + var e = document.getElementById(d.id); + + remove_class(e, 'hovering'); // hide text if not selected if (!selection.link_related(d)) { - set_link_label_text(this.id, ""); + set_link_label_text(d.id, ""); } } var link_on_hover = function (d) { $('#' + d.id).hover(function (e) { - link__hover__start.call(this, d); + link__hover__start(d); }, function (e) { - link__hover__end.call(this, d); + link__hover__end(d); }); } |
