Merge pull request #23 from mengdehong/main

fix(dashboard): optimize pan/zoom performance for large graphs
This commit is contained in:
Yuxiang Lin
2026-03-24 21:35:13 +08:00
committed by GitHub
2 changed files with 6 additions and 2 deletions
@@ -80,8 +80,7 @@ function CustomNodeComponent({
return (
<div
className={`relative rounded-lg bg-elevated border border-border-subtle ${extraClass} min-w-[180px] max-w-[220px] overflow-hidden transition-all duration-200 cursor-pointer`}
style={{ boxShadow: '0 2px 8px rgba(0,0,0,0.3)' }}
className={`relative rounded-lg bg-elevated border border-border-subtle ${extraClass} min-w-[180px] max-w-[220px] overflow-hidden transition-[box-shadow,outline,opacity,filter] duration-200 cursor-pointer shadow-[0_2px_8px_rgba(0,0,0,0.3)]`}
onClick={() => data.onNodeClick?.(id)}
>
{/* Left color bar */}
@@ -444,6 +444,11 @@ function GraphViewInner() {
onNodeClick={onNodeClick}
onPaneClick={onPaneClick}
nodeTypes={nodeTypes}
nodesDraggable={false}
nodesConnectable={false}
edgesFocusable={false}
edgesReconnectable={false}
elementsSelectable={false}
fitView
fitViewOptions={{ minZoom: 0.01, padding: 0.1 }}
minZoom={0.01}