fix: build issues

Some optional description over here if you need to add more info

on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
darshanr0107
2025-08-05 20:22:17 +05:30
parent d7308b0f43
commit 074f18dfb8

View File

@@ -1,6 +1,5 @@
import type { Position } from 'cytoscape'; import type { LayoutOptions, Position } from 'cytoscape';
import cytoscape from 'cytoscape'; import cytoscape from 'cytoscape';
import type { FcoseLayoutOptions } from 'cytoscape-fcose';
import fcose from 'cytoscape-fcose'; import fcose from 'cytoscape-fcose';
import { select } from 'd3'; import { select } from 'd3';
import type { DrawDefinition, SVG } from '../../diagram-api/types.js'; import type { DrawDefinition, SVG } from '../../diagram-api/types.js';
@@ -41,7 +40,7 @@ registerIconPacks([
icons: architectureIcons, icons: architectureIcons,
}, },
]); ]);
cytoscape.use(fcose); cytoscape.use(fcose as any);
function addServices(services: ArchitectureService[], cy: cytoscape.Core, db: ArchitectureDB) { function addServices(services: ArchitectureService[], cy: cytoscape.Core, db: ArchitectureDB) {
services.forEach((service) => { services.forEach((service) => {
@@ -429,7 +428,7 @@ function layoutArchitecture(
}, },
alignmentConstraint, alignmentConstraint,
relativePlacementConstraint, 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 // 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', () => { layout.one('layoutstop', () => {