浏览代码

rm: unused codes

Young Han 2 月之前
父节点
当前提交
8a2fb220fd

+ 0 - 7
end-to-end-use-cases/long_context/book-character-mindmap/src/pages/bookPage/components/CharacterGraph.jsx

@@ -1,6 +1,5 @@
 import { useState, useEffect, useRef } from "react";
 import { useState, useEffect, useRef } from "react";
 import ForceGraph2D from "react-force-graph-2d";
 import ForceGraph2D from "react-force-graph-2d";
-// import * as d3 from 'd3';
 
 
 export default function CharacterGraph({ graphData }) {
 export default function CharacterGraph({ graphData }) {
   const containerRef = useRef(null);
   const containerRef = useRef(null);
@@ -33,12 +32,6 @@ export default function CharacterGraph({ graphData }) {
           ref={fgRef}
           ref={fgRef}
           graphData={graphData}
           graphData={graphData}
           nodeCanvasObject={(node, ctx, globalScale) => {
           nodeCanvasObject={(node, ctx, globalScale) => {
-            // Draw node
-            ctx.beginPath();
-            ctx.arc(node.x, node.y, 5, 0, 2 * Math.PI);
-            ctx.fillStyle = "transparent";
-            ctx.fill();
-
             // Always show node label
             // Always show node label
             const label = node.name;
             const label = node.name;
             const fontSize = 20 / globalScale;
             const fontSize = 20 / globalScale;