summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2015-05-12 13:31:41 +0300
committerAlon Levy <alon@pobox.com>2015-05-12 13:31:41 +0300
commit095e9e86fbb693aaf4dc04744873c9c8b6109270 (patch)
tree13a381a0c4c870f02a0e52009777586bf348aa78
parent3f4c98e95591c4109401fd8c670c4361b9446ce0 (diff)
client/view/graph_view: link_hover: don't use this
-rw-r--r--src/client/view/graph_view.js16
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);
});
}