diff --git a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts index b29567236..608b11816 100644 --- a/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts +++ b/packages/mermaid/src/diagrams/architecture/architectureRenderer.ts @@ -1,6 +1,5 @@ -import type { Position } from 'cytoscape'; +import type { LayoutOptions, Position } from 'cytoscape'; import cytoscape from 'cytoscape'; -import type { FcoseLayoutOptions } from 'cytoscape-fcose'; import fcose from 'cytoscape-fcose'; import { select } from 'd3'; import type { DrawDefinition, SVG } from '../../diagram-api/types.js'; @@ -41,7 +40,7 @@ registerIconPacks([ icons: architectureIcons, }, ]); -cytoscape.use(fcose); +cytoscape.use(fcose as any); function addServices(services: ArchitectureService[], cy: cytoscape.Core, db: ArchitectureDB) { services.forEach((service) => { @@ -429,7 +428,7 @@ function layoutArchitecture( }, alignmentConstraint, relativePlacementConstraint, - } as FcoseLayoutOptions); + } as LayoutOptions); // Once the diagram has been generated and the service's position cords are set, adjust the XY edges to have a 90deg bend layout.one('layoutstop', () => {