lanxin 3 settimane fa
parent
commit
a1c7a4f5cd

+ 85 - 87
public/unityMo/index.html

@@ -1,41 +1,39 @@
 <!DOCTYPE html>
 <html lang="zh-CN">
-
-<head>
-    <meta charset="utf-8">
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+  <head>
+    <meta charset="utf-8" />
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <title>Chenzhebei-ShanxiMuseum</title>
-    <link rel="shortcut icon" href="TemplateData/favicon.ico">
-    <link rel="stylesheet" href="index.css">
-    <link rel="stylesheet" href="TemplateData/style.css">
+    <link rel="shortcut icon" href="TemplateData/favicon.ico" />
+    <link rel="stylesheet" href="index.css" />
+    <link rel="stylesheet" href="TemplateData/style.css" />
     <script src="./export_main.js"></script>
     <script src="./export_tombstoneView.js"></script>
     <script src="./export_roomScene.js"></script>
     <script src="./export_drawingBoard.js"></script>
-</head>
+  </head>
 
-<body>
+  <body>
     <div id="unity-container">
-        <canvas id="unity-canvas" width=960 height=600 tabindex="-1"></canvas>
-        <div id="unity-loading-bar">
-            <div id="unity-progress-bar-empty">
-                <div id="unity-progress-bar-full"></div>
-            </div>
+      <canvas id="unity-canvas" width="960" height="600" tabindex="-1"></canvas>
+      <div id="unity-loading-bar">
+        <div id="unity-progress-bar-empty">
+          <div id="unity-progress-bar-full"></div>
         </div>
-        <div id="unity-warning"></div>
+      </div>
+      <div id="unity-warning"></div>
 
-        <div class="save-image-block">
-            <img src="" class="save-image-background" alt="">
-        </div>
+      <div class="save-image-block">
+        <img src="" class="save-image-background" alt="" />
+      </div>
     </div>
-</body>
-<script>
-
-    var container = document.querySelector("#unity-container");
-    var canvas = document.querySelector("#unity-canvas");
-    var loadingBar = document.querySelector("#unity-loading-bar");
-    var progressBarFull = document.querySelector("#unity-progress-bar-full");
-    var warningBanner = document.querySelector("#unity-warning");
+  </body>
+  <script>
+    var container = document.querySelector('#unity-container')
+    var canvas = document.querySelector('#unity-canvas')
+    var loadingBar = document.querySelector('#unity-loading-bar')
+    var progressBarFull = document.querySelector('#unity-progress-bar-full')
+    var warningBanner = document.querySelector('#unity-warning')
 
     // Shows a temporary message banner/ribbon for a few seconds, or
     // a permanent error message on top of the canvas if type=='error'.
@@ -44,36 +42,36 @@
     // way that non-critical warnings and error messages are presented to the
     // user.
     function unityShowBanner(msg, type) {
-        function updateBannerVisibility() {
-            warningBanner.style.display = warningBanner.children.length ? 'block' : 'none';
-        }
-        var div = document.createElement('div');
-        div.innerHTML = msg;
-        warningBanner.appendChild(div);
-        if (type == 'error') div.style = 'background: red; padding: 10px;';
-        else {
-            if (type == 'warning') div.style = 'background: yellow; padding: 10px;';
-            setTimeout(function () {
-                warningBanner.removeChild(div);
-                updateBannerVisibility();
-            }, 5000);
-        }
-        updateBannerVisibility();
+      function updateBannerVisibility() {
+        warningBanner.style.display = warningBanner.children.length ? 'block' : 'none'
+      }
+      var div = document.createElement('div')
+      div.innerHTML = msg
+      warningBanner.appendChild(div)
+      if (type == 'error') div.style = 'background: red; padding: 10px;'
+      else {
+        if (type == 'warning') div.style = 'background: yellow; padding: 10px;'
+        setTimeout(function () {
+          warningBanner.removeChild(div)
+          updateBannerVisibility()
+        }, 5000)
+      }
+      updateBannerVisibility()
     }
 
-    var buildUrl = "Build";
-    var loaderUrl = buildUrl + "/Build.loader.js";
+    var buildUrl = 'Build'
+    var loaderUrl = buildUrl + '/Build.loader.js'
     var config = {
-        dataUrl: buildUrl + "/Build.data.unityweb",
-        frameworkUrl: buildUrl + "/Build.framework.js.unityweb",
-        codeUrl: buildUrl + "/Build.wasm.unityweb",
-        streamingAssetsUrl: "StreamingAssets",
-        devicePixelRatio: 1,
-        companyName: "FDage",
-        productName: "Chenzhebei-ShanxiMuseum",
-        productVersion: "0.1",
-        showBanner: unityShowBanner,
-    };
+      dataUrl: buildUrl + '/Build.data.unityweb',
+      frameworkUrl: buildUrl + '/Build.framework.js.unityweb',
+      codeUrl: buildUrl + '/Build.wasm.unityweb',
+      streamingAssetsUrl: 'StreamingAssets',
+      devicePixelRatio: 2,
+      companyName: 'FDage',
+      productName: 'Chenzhebei-ShanxiMuseum',
+      productVersion: '0.1',
+      showBanner: unityShowBanner
+    }
 
     // By default Unity keeps WebGL canvas render target size matched with
     // the DOM size of the canvas element (scaled by window.devicePixelRatio)
@@ -83,42 +81,42 @@
     // config.matchWebGLToCanvasSize = false;
 
     if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
-        // Mobile device style: fill the whole browser client area with the game canvas:
-        var meta = document.createElement('meta');
-        meta.name = 'viewport';
-        meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes';
-        document.getElementsByTagName('head')[0].appendChild(meta);
-        document.querySelector("#unity-container").className = "unity-mobile";
-        canvas.className = "unity-mobile";
+      // Mobile device style: fill the whole browser client area with the game canvas:
+      var meta = document.createElement('meta')
+      meta.name = 'viewport'
+      meta.content =
+        'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes'
+      document.getElementsByTagName('head')[0].appendChild(meta)
+      document.querySelector('#unity-container').className = 'unity-mobile'
+      canvas.className = 'unity-mobile'
 
-        // To lower canvas resolution on mobile devices to gain some
-        // performance, uncomment the following line:
-        // config.devicePixelRatio = 1;
+      // To lower canvas resolution on mobile devices to gain some
+      // performance, uncomment the following line:
+      // config.devicePixelRatio = 1;
     }
 
-
-
-    loadingBar.style.display = "block";
-    var script = document.createElement("script");
-    script.src = loaderUrl;
+    loadingBar.style.display = 'block'
+    var script = document.createElement('script')
+    script.src = loaderUrl
     script.onload = () => {
-        createUnityInstance(canvas, config, (progress) => {
-            if (window.parent && window.parent !== window) {
-                window.parent.unityLoading(progress);
-            }
-            progressBarFull.style.width = 100 * progress + "%";
-        }).then((unityInstance) => {
-            loadingBar.style.display = "none";
-            window.unityInstance = unityInstance;
-
-            if (window.parent && window.parent !== window) {
-                window.parent.unityLoading(1);
-            }
-        }).catch((message) => {
-            alert(message);
-        });
-    };
-    document.body.appendChild(script);
-</script>
+      createUnityInstance(canvas, config, progress => {
+        if (window.parent && window.parent !== window) {
+          window.parent.unityLoading(progress)
+        }
+        progressBarFull.style.width = 100 * progress + '%'
+      })
+        .then(unityInstance => {
+          loadingBar.style.display = 'none'
+          window.unityInstance = unityInstance
 
-</html>
+          if (window.parent && window.parent !== window) {
+            window.parent.unityLoading(1)
+          }
+        })
+        .catch(message => {
+          alert(message)
+        })
+    }
+    document.body.appendChild(script)
+  </script>
+</html>

+ 3 - 3
src/pages/A6ybwx/A6_2_zxzgh/components/Bz/index.module.scss

@@ -204,7 +204,7 @@
             width: 320px;
             height: 170px;
             .main {
-              width: 165px;
+              width: 170px;
               text-align: right;
               white-space: normal;
             }
@@ -260,11 +260,11 @@
           }
 
           .bz3 {
-            transform: translate(-135%, 42%);
+            transform: translate(-138%, 42%);
             width: 320px;
             height: 170px;
             .main {
-              width: 170px;
+              width: 193px;
               text-align: right;
               white-space: normal;
             }

+ 1 - 0
src/pages/A6ybwx/Genealogy/components/Graph/index.module.scss

@@ -75,6 +75,7 @@
     pointer-events: auto !important;
     user-select: none;
     position: absolute;
+    z-index: 10;
     border: 1px solid #ffe9b6;
     cursor: move;
     background: rgba(255, 233, 182, 0.1);

+ 81 - 92
src/pages/A6ybwx/Genealogy/components/Graph/index.tsx

@@ -11,23 +11,25 @@ const MAIN_CONTENT_HEIGHT = 945
 const MINIMAP_SCALE = 0.045
 
 function Graph({ setCurrentNodeIndex }: { setCurrentNodeIndex: (index: number) => void }) {
-
-
   const { myData } = useSelector((state: RootState) => state.A0Layout)
 
-  // 新增拖拽相关状态
   const [isDragging, setIsDragging] = useState(false)
   const [startX, setStartX] = useState(0)
   const [startY, setStartY] = useState(0)
   const [offsetX, setOffsetX] = useState(0)
   const [offsetY, setOffsetY] = useState(0)
 
+  // 小地图相关逻辑
+  const [contentSize, setContentSize] = useState({ width: 2000, height: 1200 })
+  const miniMapScale = 0.1
+
   // 设置初始位置
   useEffect(() => {
     setOffsetX(0)
     setOffsetY(-200)
   }, [])
 
+  // graph
   const startRef = useRef({
     startX: 0,    // 触摸起始点 X 坐标
     startY: 0,    // 触摸起始点 Y 坐标
@@ -35,62 +37,66 @@ function Graph({ setCurrentNodeIndex }: { setCurrentNodeIndex: (index: number) =
     startOffsetY: 0  // 元素起始偏移 Y
   });
 
-  const graphRef = useRef<HTMLDivElement>(null); // 已存在,无需新增
+  const graphRef = useRef<HTMLDivElement>(null);
+
+  // miniMap
+  const miniMapStartRef = useRef({
+    startX: 0,    // 触摸起始点 X 坐标
+    startY: 0,    // 触摸起始点 Y 坐标
+    startOffsetX: 0, // 元素起始偏移 X
+    startOffsetY: 0  // 元素起始偏移 Y
+  });
 
-  // 原生事件处理函数(无需 useCallback,因为在 useEffect 内绑定)
-  // const nativeTouchStart = (e: TouchEvent) => {
-  //   const el = graphRef.current;
-  //   if (!el || e.target !== el) return; // 仅容器本身触发
+  // 针对移动端miniMap
+  useEffect(() => {
+    const miniMapViewport = document.getElementById('miniMapViewport') as HTMLDivElement
+    if (!miniMapViewport) return
 
-  //   const touch = e.touches[0];
-  //   if (!touch) return;
+    const handleTouchStart = (e: TouchEvent) => {
+      console.log('touchStart')
+      const touch = e.touches[0];
+      // 记录触摸起始坐标
+      miniMapStartRef.current.startX = touch.clientX;
+      miniMapStartRef.current.startY = touch.clientY;
 
-  //   startRef.current = {
-  //     startX: touch.clientX,
-  //     startY: touch.clientY,
-  //     startOffsetX: offsetX,
-  //     startOffsetY: offsetY,
-  //   };
-  // };
+      miniMapStartRef.current.startOffsetX = offsetX;
+      miniMapStartRef.current.startOffsetY = offsetY;
 
-  // const nativeTouchMove = (e: TouchEvent) => {
-  //   const el = graphRef.current;
-  //   if (!el) return;
+    }
 
-  //   const touch = e.touches[0];
-  //   if (!touch) return;
+    const handleTouchMove = (e: TouchEvent) => {
+      console.log('touchMove')
+      const touch = e.touches[0];
+      if (!touch) return;
+      // 计算滑动距离 = 当前触摸位置 - 初始触摸位置
+      const dx = touch.clientY - miniMapStartRef.current.startY;
+      const dy = -touch.clientX + miniMapStartRef.current.startX;
 
-  //   const { startX, startY, startOffsetX, startOffsetY } = startRef.current;
-  //   const dx = touch.clientX - startX;
-  //   const dy = touch.clientY - startY;
+      setOffsetX(prev => {
+        const newX = miniMapStartRef.current.startOffsetX - dx * 18;
+        return Math.min(0, Math.max(-1640, newX));
+        // return newX
+      });
 
-  //   const newX = startOffsetX + dx;
-  //   const newY = startOffsetY + dy;
+      setOffsetY(prev => {
+        const newY = miniMapStartRef.current.startOffsetY - dy * 7;
+        return Math.min(0, Math.max(-350, newY));
+        // return newY
+      });
 
-  //   // 打印坐标,确认是否持续触发
-  //   console.log('原生touchmove:', touch.clientX, touch.clientY);
+    }
 
-  //   setOffsetX(Math.min(0, Math.max(-1640, newX)));
-  //   setOffsetY(Math.min(0, Math.max(-350, newY)));
-  // };
+    miniMapViewport.addEventListener('touchstart', handleTouchStart)
+    miniMapViewport.addEventListener('touchmove', handleTouchMove)
 
-  // useEffect(() => {
-  //   const el = graphRef.current;
-  //   console.log('offsetX, offsetY', el)
-  //   if (!el) return;
+    return () => {
+      miniMapViewport.removeEventListener('touchstart', handleTouchStart)
+      miniMapViewport.removeEventListener('touchmove', handleTouchMove)
+    }
+  }, [contentSize.height, contentSize.width, offsetX, offsetY])
 
-  //   // 绑定原生事件(passive: false 可选,这里用了 touchAction: none 不需要)
-  //   el.addEventListener('touchstart', nativeTouchStart);
-  //   el.addEventListener('touchmove', nativeTouchMove);
 
-  //   // 卸载时解绑
-  //   // return () => {
-  //   //   el.removeEventListener('touchstart', nativeTouchStart);
-  //   //   el.removeEventListener('touchmove', nativeTouchMove);
-  //   // };
-  // }, [offsetX, offsetY]);
 
-  // 新增事件处理函数
   const handleMouseDown = (e: React.MouseEvent) => {
     if (e.target === e.currentTarget) { // 仅当点击容器本身时触发拖拽
       e.stopPropagation();
@@ -104,7 +110,6 @@ function Graph({ setCurrentNodeIndex }: { setCurrentNodeIndex: (index: number) =
 
   const handleTouchStart = useCallback((e: React.TouchEvent) => {
     const touch = e.touches[0]; // 获取第一个触摸点(单指拖拽)
-    console.log(touch.clientX, touch.clientY)
     // if (!touch) return;
 
     // 记录触摸起始坐标
@@ -124,15 +129,19 @@ function Graph({ setCurrentNodeIndex }: { setCurrentNodeIndex: (index: number) =
       const dy = e.clientY - startY
 
       // 使用函数式更新确保获取最新状态值
-      setOffsetX(prev => {
-        const newX = prev + dx
-        return Math.min(0, Math.max(-1640, newX))
-      })
+      // setOffsetX(prev => {
+      //   const newX = prev + dx
+      //   return Math.min(0, Math.max(-1640, newX))
+      // })
 
-      setOffsetY(prev => {
-        const newY = prev + dy
-        return Math.min(0, Math.max(-350, newY))
-      })
+      setOffsetX(Math.min(0, Math.max(-1640, offsetX + dx)))
+
+      // setOffsetY(prev => {
+      //   const newY = prev + dy
+      //   return Math.min(0, Math.max(-350, newY))
+      // })
+
+      setOffsetY(Math.min(0, Math.max(-350, offsetY + dy)))
 
       // 更新起始坐标为当前鼠标位置(保持相对移动)
       setStartX(e.clientX)
@@ -141,7 +150,6 @@ function Graph({ setCurrentNodeIndex }: { setCurrentNodeIndex: (index: number) =
   }
 
   const handleTouchMove = useCallback((e: React.TouchEvent) => {
-    console.log(123)
     const touch = e.touches[0];
     if (!touch) return;
 
@@ -169,10 +177,7 @@ function Graph({ setCurrentNodeIndex }: { setCurrentNodeIndex: (index: number) =
     setIsDragging(false)
   }
 
-  // 新增小地图相关逻辑
-  // const graphRef = useRef<HTMLDivElement>(null)
-  const [contentSize, setContentSize] = useState({ width: 2000, height: 1200 })
-  const miniMapScale = 0.1
+
 
   // 动态获取容器尺寸
   useEffect(() => {
@@ -182,20 +187,8 @@ function Graph({ setCurrentNodeIndex }: { setCurrentNodeIndex: (index: number) =
   }, [])
 
   // 小地图拖拽绑定
-  const bind = useDrag(({ offset: [x, y] }) => {
-    // 计算视口最大移动范围
-    const maxX = contentSize.width * miniMapScale - MAIN_CONTENT_WIDTH * MINIMAP_SCALE - 2
-    const maxY = contentSize.height * miniMapScale - MAIN_CONTENT_HEIGHT * MINIMAP_SCALE - 4
-    console.log(maxX, maxY, '------------')
-    // 钳制坐标范围
-    const clampedX = Math.max(0, Math.min(x, maxX))
-    const clampedY = Math.max(0, Math.min(y, maxY))
-    setOffsetX(-clampedX / miniMapScale)
-    setOffsetY(-clampedY / miniMapScale)
-  })
-
-  const bindMobile = useDrag(({ offset: [x, y] }) => {
-    console.log(x, y, '------------')
+  const bind = useDrag(({ initial: [initX, initY], offset: [x, y] }) => {
+    console.log(initX, initY, x, y, 'bind')
     // 计算视口最大移动范围
     const maxX = contentSize.width * miniMapScale - MAIN_CONTENT_WIDTH * MINIMAP_SCALE - 2
     const maxY = contentSize.height * miniMapScale - MAIN_CONTENT_HEIGHT * MINIMAP_SCALE - 4
@@ -204,11 +197,6 @@ function Graph({ setCurrentNodeIndex }: { setCurrentNodeIndex: (index: number) =
     const clampedY = Math.max(0, Math.min(y, maxY))
     setOffsetX(-clampedX / miniMapScale)
     setOffsetY(-clampedY / miniMapScale)
-  }, {
-    // 移动端专用配置
-    pointer: { touch: true },
-    preventScroll: true,
-    filterTouches: (e: TouchEvent) => e.target === e.currentTarget
   })
 
 
@@ -221,20 +209,20 @@ function Graph({ setCurrentNodeIndex }: { setCurrentNodeIndex: (index: number) =
     <>
       {myData.genealogyData.map((item, index) => {
         let res
-        if (item.type === 'active') res = <NodeActive key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} nameClick={() => handleNameClick(index)} className='nodeActiveG' />
-        if (item.type === 'nodeRight_n') res = <NodeRight key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='normal' nameClick={() => handleNameClick(index)} />
+        if (item.type === 'active') res = <NodeActive key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} className='nodeActiveG' />
+        if (item.type === 'nodeRight_n') res = <NodeRight key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='normal' />
         if (item.type === 'nodeRight_a') res = <NodeRight key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='active' />
-        if (item.type === 'nodeRight_f') res = <NodeRight key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='false' nameClick={() => handleNameClick(index)} />
-        if (item.type === 'nodeBottom_n') res = <NodeBottom key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='normal' nameClick={() => handleNameClick(index)} />
-        if (item.type === 'nodeTurnRight_n') res = <NodeTurnRight key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='normal' nameClick={() => handleNameClick(index)} />
+        if (item.type === 'nodeRight_f') res = <NodeRight key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='false' />
+        if (item.type === 'nodeBottom_n') res = <NodeBottom key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='normal' />
+        if (item.type === 'nodeTurnRight_n') res = <NodeTurnRight key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='normal' />
         if (item.type === 'nodeTurnRight_a') res = <NodeTurnRight key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='active' />
         if (item.type === 'nodeTurnBottomRight_a') res = <NodeTurnBottomRight key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='active' />
-        if (item.type === 'nodeTurnBottomRight_n') res = <NodeTurnBottomRight key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='normal' nameClick={() => handleNameClick(index)} />
-        if (item.type === 'nodeRight_dash_n') res = <NodeRightDash key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='normal' nameClick={() => handleNameClick(index)} />
+        if (item.type === 'nodeTurnBottomRight_n') res = <NodeTurnBottomRight key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='normal' />
+        if (item.type === 'nodeRight_dash_n') res = <NodeRightDash key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='normal' />
         if (item.type === 'nodeRight_dash_a') res = <NodeRightDash key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='active' />
-        if (item.type === 'nodeRight_dash_f') res = <NodeRightDash key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='false' nameClick={() => handleNameClick(index)} />
-        if (item.type === 'nodeBottom_dash_n') res = <NodeBottomDash key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='normal' nameClick={() => handleNameClick(index)} />
-        if (item.type === 'nodeTurnBottomDashRight_n') res = <NodeTurnBottomDashRight key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='normal' nameClick={() => handleNameClick(index)} />
+        if (item.type === 'nodeRight_dash_f') res = <NodeRightDash key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='false' />
+        if (item.type === 'nodeBottom_dash_n') res = <NodeBottomDash key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='normal' />
+        if (item.type === 'nodeTurnBottomDashRight_n') res = <NodeTurnBottomDashRight key={index} data={item} style={{ transform: `translate(${item.position.x}px, ${item.position.y}px)` }} type='normal' />
         return res
       })}
     </>
@@ -283,7 +271,7 @@ function Graph({ setCurrentNodeIndex }: { setCurrentNodeIndex: (index: number) =
           userSelect: 'none'
         }}
       >
-        <NodeData />
+        <NodeClickData />
       </div>
       <div className={styles.tip}>
         <div className='t1'>
@@ -300,7 +288,8 @@ function Graph({ setCurrentNodeIndex }: { setCurrentNodeIndex: (index: number) =
       <div className={styles.miniMap}>
         <div
           className={styles.viewport}
-          {...(isMobiileFu() ? bindMobile() : bind())}
+          id='miniMapViewport'
+          {...(isMobiileFu() ? null : bind())}
           style={{
             transform: `translate(${-offsetX * miniMapScale}px, ${-offsetY * miniMapScale}px)`,
             width: `${MAIN_CONTENT_WIDTH * MINIMAP_SCALE}px`,
@@ -315,7 +304,7 @@ function Graph({ setCurrentNodeIndex }: { setCurrentNodeIndex: (index: number) =
             height: `${contentSize.height}px`
           }}
         >
-          <NodeClickData />
+          <NodeData />
         </div>
       </div>
     </>