From 87ec4361b945c7f203efaf01fa7d5db2af5cf9ac Mon Sep 17 00:00:00 2001 From: Fine Date: Wed, 14 Sep 2022 17:48:31 +0800 Subject: [PATCH] remove unuse codes --- .../components/Graph/nodeProcess.ts | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 src/views/dashboard/related/network-profiling/components/Graph/nodeProcess.ts diff --git a/src/views/dashboard/related/network-profiling/components/Graph/nodeProcess.ts b/src/views/dashboard/related/network-profiling/components/Graph/nodeProcess.ts deleted file mode 100644 index 8a823542..00000000 --- a/src/views/dashboard/related/network-profiling/components/Graph/nodeProcess.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import icons from "@/assets/img/icons"; -import { Node } from "@/types/topology"; - -export default (d3: any, graph: any, funcs: any, tip: any) => { - const nodeEnter = graph - .append("g") - .attr("class", "topo-node") - .call( - d3 - .drag() - .on("start", funcs.dragstart) - .on("drag", funcs.dragged) - .on("end", funcs.dragended) - ) - .on("mouseover", function (event: unknown, d: Node) { - tip.html(funcs.tipHtml).show(d, this); - }) - .on("mouseout", function () { - tip.hide(this); - }); - nodeEnter - .append("image") - .attr("width", 35) - .attr("height", 35) - .attr("x", (d: { x: number }) => d.x - 15) - .attr("y", (d: { y: number }) => d.y - 15) - .attr("style", "cursor: move;") - .attr("xlink:href", icons.CUBE); - nodeEnter - .append("text") - .attr("fill", "#000") - .attr("text-anchor", "middle") - .attr("x", (d: { x: number }) => d.x) - .attr("y", (d: { y: number }) => d.y + 28) - .text((d: { name: string }) => - d.name.length > 10 ? `${d.name.substring(0, 10)}...` : d.name - ); - return nodeEnter; -};