diff --git a/src/views/dashboard/related/topology/Graph.vue b/src/views/dashboard/related/topology/Graph.vue index b38568cc..f7789520 100644 --- a/src/views/dashboard/related/topology/Graph.vue +++ b/src/views/dashboard/related/topology/Graph.vue @@ -16,7 +16,7 @@ limitations under the License. -->
diff --git a/src/views/dashboard/related/topology/utils/linkElement.ts b/src/views/dashboard/related/topology/utils/linkElement.ts index 8f27d368..a4c9d327 100644 --- a/src/views/dashboard/related/topology/utils/linkElement.ts +++ b/src/views/dashboard/related/topology/utils/linkElement.ts @@ -32,7 +32,7 @@ export const anchorElement = (graph: any, funcs: any, tip: any) => { .attr("class", "topo-line-anchor") .attr("r", 5) .attr("fill", (d: { cpm: number }) => (d.cpm ? "#217EF25f" : "#6a6d7777")) - .on("mouseover", function (d: unknown) { + .on("mouseover", function (event: unknown, d: unknown) { tip.html(funcs.$tip).show(d, this); }) .on("mouseout", function () { diff --git a/src/views/dashboard/related/topology/utils/nodeElement.ts b/src/views/dashboard/related/topology/utils/nodeElement.ts index 30412892..34b0a73c 100644 --- a/src/views/dashboard/related/topology/utils/nodeElement.ts +++ b/src/views/dashboard/related/topology/utils/nodeElement.ts @@ -27,13 +27,17 @@ export default (d3: any, graph: any, tool: any, funcs: any, tip: any) => { .on("drag", funcs.dragged) .on("end", funcs.dragended) ) - .on("mouseover", function (d: any) { - tip.html((data: any) => `
${data.name}
`).show(d, this); + .on("mouseover", function (event: any, d: { name: string }) { + tip + .html(() => { + return `
${d.name}
`; + }) + .show(d, this); }) .on("mouseout", function () { tip.hide(this); }) - .on("click", (event: any, d: any) => { + .on("click", (event: any, d: unknown) => { event.stopPropagation(); // event.preventDefault(); // tool.attr("style", "display: none");