mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-02-04 07:13:25 +08:00
Remove console.logs
This commit is contained in:
parent
9a0d5e31b7
commit
32ba2d5ffe
@ -1433,6 +1433,24 @@ Returns **[object][5]** The siteConfig
|
|||||||
|
|
||||||
Returns **[object][5]** The siteConfig
|
Returns **[object][5]** The siteConfig
|
||||||
|
|
||||||
|
## setConfig
|
||||||
|
|
||||||
|
## setConfig
|
||||||
|
|
||||||
|
| Function | Description | Type | Values |
|
||||||
|
| ------------- | ------------------------------------- | ----------- | --------------------------------------- |
|
||||||
|
| setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array |
|
||||||
|
|
||||||
|
**Notes**: Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure
|
||||||
|
keys. Any values found in conf with key found in siteConfig.secure will be replaced with the
|
||||||
|
corresponding siteConfig value.
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
- `conf` **any** The potential currentConfig
|
||||||
|
|
||||||
|
Returns **any** The currentConfig merged with the sanitized conf
|
||||||
|
|
||||||
## render
|
## render
|
||||||
|
|
||||||
Function that renders an svg with a graph from a chart definition. Usage example below.
|
Function that renders an svg with a graph from a chart definition. Usage example below.
|
||||||
@ -1452,32 +1470,14 @@ $(function () {
|
|||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
- `id` **any** The id of the element to be rendered
|
- `id` **[string][6]** The id of the element to be rendered
|
||||||
- `text` **any** The graph definition
|
- `text` **[string][6]** The graph definition
|
||||||
- `cb` **any** Callback which is called after rendering is finished with the svg code as inparam.
|
- `cb` **function (svgCode: [string][6], bindFunctions: function (element: [Element][7]): void): void**
|
||||||
- `container` **any** Selector to element in which a div with the graph temporarily will be
|
- `container` **[Element][7]** Selector to element in which a div with the graph temporarily will be
|
||||||
inserted. In one is provided a hidden div will be inserted in the body of the page instead. The
|
inserted. In one is provided a hidden div will be inserted in the body of the page instead. The
|
||||||
element will be removed when rendering is completed.
|
element will be removed when rendering is completed.
|
||||||
|
|
||||||
Returns **any**
|
Returns **void**
|
||||||
|
|
||||||
## setConfig
|
|
||||||
|
|
||||||
## setConfig
|
|
||||||
|
|
||||||
| Function | Description | Type | Values |
|
|
||||||
| ------------- | ------------------------------------- | ----------- | --------------------------------------- |
|
|
||||||
| setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array |
|
|
||||||
|
|
||||||
**Notes**: Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure
|
|
||||||
keys. Any values found in conf with key found in siteConfig.secure will be replaced with the
|
|
||||||
corresponding siteConfig value.
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
- `conf` **any** The potential currentConfig
|
|
||||||
|
|
||||||
Returns **any** The currentConfig merged with the sanitized conf
|
|
||||||
|
|
||||||
## getConfig
|
## getConfig
|
||||||
|
|
||||||
@ -1615,3 +1615,7 @@ Returns **void**
|
|||||||
[4]: #mermaidapi-configuration-defaults
|
[4]: #mermaidapi-configuration-defaults
|
||||||
|
|
||||||
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
||||||
|
|
||||||
|
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
|
||||||
|
|
||||||
|
[7]: https://developer.mozilla.org/docs/Web/API/Element
|
||||||
|
@ -1822,7 +1822,6 @@ const config: Partial<MermaidConfig> = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(JSON.stringify(config));
|
|
||||||
if (config.class) config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
if (config.class) config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
||||||
if (config.gitGraph) config.gitGraph.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
if (config.gitGraph) config.gitGraph.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ const render = function (
|
|||||||
id: string,
|
id: string,
|
||||||
text: string,
|
text: string,
|
||||||
cb: (svgCode: string, bindFunctions?: (element: Element) => void) => void,
|
cb: (svgCode: string, bindFunctions?: (element: Element) => void) => void,
|
||||||
container: Element
|
container?: Element
|
||||||
): void {
|
): void {
|
||||||
configApi.reset();
|
configApi.reset();
|
||||||
text = text.replace(/\r\n?/g, '\n'); // parser problems on CRLF ignore all CR and leave LF;;
|
text = text.replace(/\r\n?/g, '\n'); // parser problems on CRLF ignore all CR and leave LF;;
|
||||||
@ -493,7 +493,6 @@ export const mermaidAPI = Object.freeze({
|
|||||||
|
|
||||||
setLogLevel(configApi.getConfig().logLevel);
|
setLogLevel(configApi.getConfig().logLevel);
|
||||||
configApi.reset(configApi.getConfig());
|
configApi.reset(configApi.getConfig());
|
||||||
console.log(mermaidAPI);
|
|
||||||
export default mermaidAPI;
|
export default mermaidAPI;
|
||||||
/**
|
/**
|
||||||
* ## mermaidAPI configuration defaults
|
* ## mermaidAPI configuration defaults
|
||||||
|
Loading…
x
Reference in New Issue
Block a user