mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 05:49:43 +02:00
Merge commit 'f8746bee0454b01378726d04f9c65bbc3974eb3a' into merge-refactor/improving-rendering-shape-types
See https://github.com/mermaid-js/mermaid/pull/5974 Conflicts: docs/config/setup/interfaces/mermaid.RenderResult.md packages/mermaid/src/rendering-util/rendering-elements/shapes/util.ts
This commit is contained in:
@@ -10,11 +10,18 @@ import { curveLinear } from 'd3';
|
||||
import ELK from 'elkjs/lib/elk.bundled.js';
|
||||
import { type TreeData, findCommonAncestor } from './find-common-ancestor.js';
|
||||
|
||||
type Node = LayoutData['nodes'][0];
|
||||
type Node = LayoutData['nodes'][number];
|
||||
|
||||
interface LabelData {
|
||||
width: number;
|
||||
height: number;
|
||||
wrappingWidth?: number;
|
||||
labelNode?: SVGGElement | null;
|
||||
}
|
||||
|
||||
interface NodeWithVertex extends Omit<Node, 'domId'> {
|
||||
children?: unknown[];
|
||||
labelData?: any;
|
||||
labelData?: LabelData;
|
||||
domId?: Node['domId'] | SVGGroup | d3.Selection<SVGAElement, unknown, Element | null, unknown>;
|
||||
}
|
||||
|
||||
@@ -45,7 +52,7 @@ export const render = async (
|
||||
nodeArr: Node[],
|
||||
node: Node
|
||||
) => {
|
||||
const labelData: any = { width: 0, height: 0 };
|
||||
const labelData: LabelData = { width: 0, height: 0 };
|
||||
|
||||
const config = getConfig();
|
||||
|
||||
|
Reference in New Issue
Block a user