diff --git a/d3.js/javascript/KEGG_canvas.js b/d3.js/javascript/KEGG_canvas.js index ad0b073..1074886 100644 --- a/d3.js/javascript/KEGG_canvas.js +++ b/d3.js/javascript/KEGG_canvas.js @@ -304,9 +304,15 @@ var KEGG_canvas = /** @class */ (function () { } }) .style("opacity", viz.edgeOpacity) - .on("mouseover", function (d) { return viz.displayTooltip(_this, d); }) - .on("mousemove", function (d) { return viz.moveTooltip(); }) - .on("mouseout", function (d) { return viz.removeTooltip(); }) + .on("mouseover", function (d) { + viz.displayTooltip(this, d); + }) + .on("mousemove", function (d) { + viz.moveTooltip(); + }) + .on("mouseout", function (d) { + viz.removeTooltip(); + }) .attr("id", "network") .call(this.force.drag); var label = node.append("text") diff --git a/typescript/KEGG_canvas/vis.ts b/typescript/KEGG_canvas/vis.ts index 7c2d52e..8f281a5 100644 --- a/typescript/KEGG_canvas/vis.ts +++ b/typescript/KEGG_canvas/vis.ts @@ -214,9 +214,15 @@ class KEGG_canvas { } }) .style("opacity", viz.edgeOpacity) - .on("mouseover", d => viz.displayTooltip(this, d)) - .on("mousemove", d => viz.moveTooltip()) - .on("mouseout", d => viz.removeTooltip()) + .on("mouseover", function (d) { + viz.displayTooltip(this, d); + }) + .on("mousemove", function (d) { + viz.moveTooltip(); + }) + .on("mouseout", function (d) { + viz.removeTooltip(); + }) .attr("id", "network") .call(this.force.drag)