revert viewBox back on DependencyGraph and add allowFullscreen prop to EntityRelationsGraph

Signed-off-by: Antonio Ereiz <antonio.ereiz@gmail.com>
This commit is contained in:
Antonio Ereiz
2025-10-27 19:14:19 +01:00
parent 5c614fff85
commit 1c7e1cefec
4 changed files with 11 additions and 1 deletions
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/core-components': patch
'@backstage/plugin-catalog-graph': patch
---
Reverted back viewbox to old values. Also, added fullScreen prop to EntityCatalogGraphCard
@@ -533,7 +533,7 @@ export function DependencyGraph<NodeData, EdgeData>(
height={graphHeight}
y={maxHeight / 2 - graphHeight / 2}
x={maxWidth / 2 - graphWidth / 2}
viewBox={`-25 -25 ${graphWidth + 50} ${graphHeight + 50}`}
viewBox={`0 0 ${graphWidth} ${graphHeight}`}
>
{graphEdges.map(e => {
const edge = graph.current.edge(e) as GraphEdge<EdgeData>;
+1
View File
@@ -182,6 +182,7 @@ export type EntityRelationsGraphProps = {
renderEdge?: DependencyGraphTypes.RenderEdgeFunction<EntityEdge>;
curve?: 'curveStepBefore' | 'curveMonotoneX';
showArrowHeads?: boolean;
allowFullscreen?: boolean;
};
// @public
@@ -92,6 +92,7 @@ export type EntityRelationsGraphProps = {
renderEdge?: DependencyGraphTypes.RenderEdgeFunction<EntityEdge>;
curve?: 'curveStepBefore' | 'curveMonotoneX';
showArrowHeads?: boolean;
allowFullscreen?: boolean;
};
/**
@@ -118,6 +119,7 @@ export const EntityRelationsGraph = (props: EntityRelationsGraphProps) => {
renderEdge,
curve,
showArrowHeads,
allowFullscreen,
} = props;
const theme = useTheme();
@@ -169,6 +171,7 @@ export const EntityRelationsGraph = (props: EntityRelationsGraphProps) => {
zoom={zoom}
curve={curve}
showArrowHeads={showArrowHeads}
allowFullscreen={allowFullscreen}
/>
)}
</div>