mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 06:49:47 +02:00
fix: resolve TypeScript errors in mermaid-layout-elk
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
@@ -1,10 +1,4 @@
|
|||||||
import type {
|
import type { InternalHelpers, LayoutData, RenderOptions, SVG, SVGGroup } from 'mermaid';
|
||||||
InternalHelpers,
|
|
||||||
LayoutData,
|
|
||||||
RenderOptions,
|
|
||||||
SVG,
|
|
||||||
SVGGroup,
|
|
||||||
} from '@mermaid-chart/mermaid';
|
|
||||||
// @ts-ignore TODO: Investigate D3 issue
|
// @ts-ignore TODO: Investigate D3 issue
|
||||||
import { curveLinear } from 'd3';
|
import { curveLinear } from 'd3';
|
||||||
import ELK from 'elkjs/lib/elk.bundled.js';
|
import ELK from 'elkjs/lib/elk.bundled.js';
|
||||||
@@ -78,6 +72,7 @@ export const render = async (
|
|||||||
// A subgraph
|
// A subgraph
|
||||||
const child: NodeWithVertex & { children: NodeWithVertex[] } = {
|
const child: NodeWithVertex & { children: NodeWithVertex[] } = {
|
||||||
...node,
|
...node,
|
||||||
|
domId: undefined,
|
||||||
children: [],
|
children: [],
|
||||||
};
|
};
|
||||||
// Let elk render with the copy
|
// Let elk render with the copy
|
||||||
@@ -900,7 +895,7 @@ export const render = async (
|
|||||||
'elk.separateConnectedComponents': true,
|
'elk.separateConnectedComponents': true,
|
||||||
'elk.alg.layered.options.EdgeStraighteningStrategy': 'NONE',
|
'elk.alg.layered.options.EdgeStraighteningStrategy': 'NONE',
|
||||||
// 'elk.layered.considerModelOrder.strategy': 'NODES_AND_EDGES', // NODES_AND_EDGES
|
// 'elk.layered.considerModelOrder.strategy': 'NODES_AND_EDGES', // NODES_AND_EDGES
|
||||||
'elk.layered.considerModelOrder.strategy': 'EDGES', // NODES_AND_EDGES
|
// 'elk.layered.considerModelOrder.strategy': 'EDGES', // NODES_AND_EDGES
|
||||||
'elk.layered.wrapping.cutting.strategy': 'ARD', // NODES_AND_EDGES
|
'elk.layered.wrapping.cutting.strategy': 'ARD', // NODES_AND_EDGES
|
||||||
},
|
},
|
||||||
children: [],
|
children: [],
|
||||||
|
Reference in New Issue
Block a user