mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 14:29:25 +02:00
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:
@@ -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', () => {
|
||||||
|
Reference in New Issue
Block a user