Merge branch 'dev' into feature/cog-3142-agentic-use-case-kuzu-lock-fix-redis-integration

This commit is contained in:
hajdul88 2025-10-10 09:51:38 +02:00 committed by GitHub
commit aeafdc1dd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -217,10 +217,24 @@ export default function GraphVisualization({ ref, data, graphControls, className
const [graphShape, setGraphShape] = useState<string>(); const [graphShape, setGraphShape] = useState<string>();
const zoomToFit: ForceGraphMethods["zoomToFit"] = (
durationMs?: number,
padding?: number,
nodeFilter?: (node: NodeObject) => boolean
) => {
if (!graphRef.current) {
console.warn("GraphVisualization: graphRef not ready yet");
return undefined as any;
}
return graphRef.current.zoomToFit?.(durationMs, padding, nodeFilter);
};
useImperativeHandle(ref, () => ({ useImperativeHandle(ref, () => ({
zoomToFit: graphRef.current!.zoomToFit, zoomToFit,
setGraphShape: setGraphShape, setGraphShape,
})); }));
return ( return (
<div ref={containerRef} className={classNames("w-full h-full", className)} id="graph-container"> <div ref={containerRef} className={classNames("w-full h-full", className)} id="graph-container">