mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
Merge branch '3358-blocks-diagram' of github.com:mermaid-js/mermaid into 3358-blocks-diagram
This commit is contained in:
commit
8f8ce2f142
@ -154,7 +154,6 @@ const populateBlockDatabase = (_blockList: Block[] | Block[][], parent: Block):
|
||||
};
|
||||
|
||||
let blocks: Block[] = [];
|
||||
const links: Link[] = [];
|
||||
let rootBlock = { id: 'root', type: 'composite', children: [], columns: -1 } as Block;
|
||||
|
||||
const clear = (): void => {
|
||||
|
@ -42,11 +42,13 @@ export const draw = async function (
|
||||
}
|
||||
const root =
|
||||
securityLevel === 'sandbox'
|
||||
? d3select(sandboxElement.nodes()[0].contentDocument.body)
|
||||
: d3select('body');
|
||||
? d3select<HTMLBodyElement, unknown>(sandboxElement.nodes()[0].contentDocument.body)
|
||||
: d3select<HTMLBodyElement, unknown>('body');
|
||||
|
||||
// @ts-ignore TODO root.select is not callable
|
||||
const svg = securityLevel === 'sandbox' ? root.select(`[id="${id}"]`) : d3select(`[id="${id}"]`);
|
||||
const svg =
|
||||
securityLevel === 'sandbox'
|
||||
? root.select<SVGSVGElement>(`[id="${id}"]`)
|
||||
: d3select<SVGSVGElement, unknown>(`[id="${id}"]`);
|
||||
|
||||
// Define the supported markers for the diagram
|
||||
const markers = ['point', 'circle', 'cross'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user