mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
fix: Remove connectDiagram
This commit is contained in:
parent
3698b30809
commit
97b39bca95
@ -217,22 +217,6 @@ const parse = (txt: string) => {
|
|||||||
return mermaidAPI.parse(txt, mermaid.parseError);
|
return mermaidAPI.parse(txt, mermaid.parseError);
|
||||||
};
|
};
|
||||||
|
|
||||||
const connectDiagram = (
|
|
||||||
id: string,
|
|
||||||
diagram: DiagramDefinition,
|
|
||||||
callback: (
|
|
||||||
_log: any,
|
|
||||||
_setLogLevel: any,
|
|
||||||
_getConfig: any,
|
|
||||||
_sanitizeText: any,
|
|
||||||
_setupGraphViewbox: any
|
|
||||||
) => void
|
|
||||||
) => {
|
|
||||||
registerDiagram(id, diagram, callback);
|
|
||||||
// Todo move this connect call to after the diagram is actually loaded.
|
|
||||||
callback(log, setLogLevel, getConfig, sanitizeText, setupGraphViewbox);
|
|
||||||
};
|
|
||||||
|
|
||||||
const mermaid: {
|
const mermaid: {
|
||||||
startOnLoad: boolean;
|
startOnLoad: boolean;
|
||||||
diagrams: any;
|
diagrams: any;
|
||||||
@ -246,8 +230,6 @@ const mermaid: {
|
|||||||
initialize: typeof initialize;
|
initialize: typeof initialize;
|
||||||
contentLoaded: typeof contentLoaded;
|
contentLoaded: typeof contentLoaded;
|
||||||
setParseErrorHandler: typeof setParseErrorHandler;
|
setParseErrorHandler: typeof setParseErrorHandler;
|
||||||
// Array of functions to use for detecting diagram types
|
|
||||||
connectDiagram: (id: string, diagram: DiagramDefinition, callback: (id: string) => void) => void;
|
|
||||||
} = {
|
} = {
|
||||||
startOnLoad: true,
|
startOnLoad: true,
|
||||||
diagrams: {},
|
diagrams: {},
|
||||||
@ -260,7 +242,6 @@ const mermaid: {
|
|||||||
parseError: undefined,
|
parseError: undefined,
|
||||||
contentLoaded,
|
contentLoaded,
|
||||||
setParseErrorHandler,
|
setParseErrorHandler,
|
||||||
connectDiagram: connectDiagram,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default mermaid;
|
export default mermaid;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user