Merge pull request #31035 from MrOpperman/master

Add `renderEdge` function to the `<DependencyGraph />`
This commit is contained in:
Vincenzo Scamporlino
2025-10-07 15:44:06 +02:00
committed by GitHub
6 changed files with 81 additions and 0 deletions
+1
View File
@@ -179,6 +179,7 @@ export type EntityRelationsGraphProps = {
zoom?: 'enabled' | 'disabled' | 'enable-on-click';
renderNode?: DependencyGraphTypes.RenderNodeFunction<EntityNode>;
renderLabel?: DependencyGraphTypes.RenderLabelFunction<EntityEdge>;
renderEdge?: DependencyGraphTypes.RenderEdgeFunction<EntityEdge>;
curve?: 'curveStepBefore' | 'curveMonotoneX';
showArrowHeads?: boolean;
};
@@ -89,6 +89,7 @@ export type EntityRelationsGraphProps = {
zoom?: 'enabled' | 'disabled' | 'enable-on-click';
renderNode?: DependencyGraphTypes.RenderNodeFunction<EntityNode>;
renderLabel?: DependencyGraphTypes.RenderLabelFunction<EntityEdge>;
renderEdge?: DependencyGraphTypes.RenderEdgeFunction<EntityEdge>;
curve?: 'curveStepBefore' | 'curveMonotoneX';
showArrowHeads?: boolean;
};
@@ -114,6 +115,7 @@ export const EntityRelationsGraph = (props: EntityRelationsGraphProps) => {
zoom = 'enabled',
renderNode,
renderLabel,
renderEdge,
curve,
showArrowHeads,
} = props;
@@ -156,6 +158,7 @@ export const EntityRelationsGraph = (props: EntityRelationsGraphProps) => {
edges={edges}
renderNode={renderNode || DefaultRenderNode}
renderLabel={renderLabel || DefaultRenderLabel}
renderEdge={renderEdge}
direction={direction}
className={classes.graph}
fit="contain"