From 0e2964d9d89750c6cf09970ecb16528400c12190 Mon Sep 17 00:00:00 2001
From: William Jeynes
- Also available in 3D + Also available in 3D (experimental)
diff --git a/graphviz/frontend/src/VizSmall3D.tsx b/graphviz/frontend/src/VizSmall3D.tsx index 0ca2be0..a31ea73 100644 --- a/graphviz/frontend/src/VizSmall3D.tsx +++ b/graphviz/frontend/src/VizSmall3D.tsx @@ -14,6 +14,7 @@ import SpriteText from 'three-spritetext'; export function VizSmall3D() { const fgRef = useRef(); + const detailsPanelRef = useRef(); const [selectedNode, setSelectedNode] = useState(null); const [minGraphSize, setMinGraphSize] = useState(10); const [showLabel, setShowLabel] = useState(false); @@ -53,7 +54,7 @@ export function VizSmall3D() { nodeAutoColorBy="type" linkColor={() => "black"} linkWidth={2.5} - onNodeClick={(node) => setSelectedNode(node)} + onNodeClick={(node) => { detailsPanelRef.current.open(); setSelectedNode(node)}} backgroundColor="white" nodeThreeObject={(node) => { const circle = new THREE.Mesh( @@ -83,7 +84,7 @@ export function VizSmall3D() { } />