@joint/react
Version:
React bindings and hooks for JointJS to build interactive diagrams and graphs.
18 lines (17 loc) • 788 B
TypeScript
import type { dia } from '@joint/core';
import type { OnPaperRenderElement } from '../components/paper-provider/paper-provider';
/**
* A custom hook that manages the rendering of SVG elements in a JointJS paper.
* @returns An object containing the rendered SVG elements and a function to handle rendering.
* @group hooks
* @description
* This hook is used to manage the rendering of SVG elements in a JointJS paper.
* It provides a function to handle the rendering of elements and a state to store the rendered SVG elements.
* It can be used to trigger a callback when the SVG element is ready.
* @private
* @internal
*/
export declare function usePaperElementRenderer(): {
recordOfSVGElements: Record<dia.Cell.ID, SVGElement>;
onRenderElement: OnPaperRenderElement;
};