Skip to content

Commit b8d8802

Browse files
committed
fix(dashboard): optimize pan/zoom interaction performance
- Widen transition to [box-shadow,outline,opacity,filter] to exclude transform (the pan/zoom culprit) while preserving ring animations (Tailwind v4 outline) and diff-fade opacity/filter transitions - Replace inline boxShadow with Tailwind shadow-[] utility so .node-glow/.diff-*-glow CSS classes compose correctly - Disable nodesDraggable, nodesConnectable, edgesFocusable, edgesReconnectable, elementsSelectable for read-only visualization
1 parent ed16da7 commit b8d8802

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

understand-anything-plugin/packages/dashboard/src/components/CustomNode.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ function CustomNodeComponent({
8080

8181
return (
8282
<div
83-
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`}
84-
style={{ boxShadow: '0 2px 8px rgba(0,0,0,0.3)' }}
83+
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)]`}
8584
onClick={() => data.onNodeClick?.(id)}
8685
>
8786
{/* Left color bar */}

understand-anything-plugin/packages/dashboard/src/components/GraphView.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,11 @@ function GraphViewInner() {
444444
onNodeClick={onNodeClick}
445445
onPaneClick={onPaneClick}
446446
nodeTypes={nodeTypes}
447+
nodesDraggable={false}
448+
nodesConnectable={false}
449+
edgesFocusable={false}
450+
edgesReconnectable={false}
451+
elementsSelectable={false}
447452
fitView
448453
fitViewOptions={{ minZoom: 0.01, padding: 0.1 }}
449454
minZoom={0.01}

0 commit comments

Comments
 (0)