mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
Removed console statements
This commit is contained in:
parent
116c616561
commit
dd866718b9
@ -25,17 +25,11 @@ export const updateCurrentConfig = (siteCfg, _directives) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cfg.theme && theme[cfg.theme]) {
|
if (cfg.theme && theme[cfg.theme]) {
|
||||||
// console.warn('cfg beeing updated main bkg', themeVariables, cfg.theme);
|
|
||||||
const variables = theme[cfg.theme].getThemeVariables(themeVariables);
|
const variables = theme[cfg.theme].getThemeVariables(themeVariables);
|
||||||
// console.warn('cfg beeing updated 2 main bkg', variables.mainBkg);
|
|
||||||
cfg.themeVariables = variables;
|
cfg.themeVariables = variables;
|
||||||
}
|
}
|
||||||
// else {
|
|
||||||
// console.warn('cfg not beeing updated main bkg', themeVariables, cfg.theme);
|
|
||||||
// }
|
|
||||||
|
|
||||||
currentConfig = cfg;
|
currentConfig = cfg;
|
||||||
// console.warn('cfg updated main bkg', cfg.sequence);
|
|
||||||
return cfg;
|
return cfg;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -53,23 +47,14 @@ export const updateCurrentConfig = (siteCfg, _directives) => {
|
|||||||
* @returns {*} - the siteConfig
|
* @returns {*} - the siteConfig
|
||||||
*/
|
*/
|
||||||
export const setSiteConfig = conf => {
|
export const setSiteConfig = conf => {
|
||||||
// siteConfig = { ...defaultConfig, ...conf };
|
|
||||||
siteConfig = assignWithDepth({}, defaultConfig);
|
siteConfig = assignWithDepth({}, defaultConfig);
|
||||||
siteConfig = assignWithDepth(siteConfig, conf);
|
siteConfig = assignWithDepth(siteConfig, conf);
|
||||||
currentConfig = updateCurrentConfig(siteConfig, directives);
|
currentConfig = updateCurrentConfig(siteConfig, directives);
|
||||||
return siteConfig;
|
return siteConfig;
|
||||||
};
|
};
|
||||||
export const updateSiteConfig = conf => {
|
export const updateSiteConfig = conf => {
|
||||||
// Object.keys(conf).forEach(key => {
|
|
||||||
// const manipulator = manipulators[key];
|
|
||||||
// conf[key] = manipulator ? manipulator(conf[key]) : conf[key];
|
|
||||||
// });
|
|
||||||
siteConfig = assignWithDepth(siteConfig, conf);
|
siteConfig = assignWithDepth(siteConfig, conf);
|
||||||
console.log('updateSiteConfig', siteConfig);
|
|
||||||
updateCurrentConfig(siteConfig, directives);
|
updateCurrentConfig(siteConfig, directives);
|
||||||
// assignWithDesetpth(currentConfig, conf, { clobber: true });
|
|
||||||
// // Set theme variables if user has set the theme option
|
|
||||||
// assignWithDepth(siteConfig, conf);
|
|
||||||
|
|
||||||
return siteConfig;
|
return siteConfig;
|
||||||
};
|
};
|
||||||
@ -164,24 +149,7 @@ export const addDirective = directive => {
|
|||||||
* @param conf - the base currentConfig to reset to (default: current siteConfig )
|
* @param conf - the base currentConfig to reset to (default: current siteConfig )
|
||||||
*/
|
*/
|
||||||
export const reset = () => {
|
export const reset = () => {
|
||||||
// Object.keys(siteConfig).forEach(key => delete siteConfig[key]);
|
|
||||||
// Object.keys(currentConfig).forEach(key => delete currentConfig[key]);
|
|
||||||
// assignWithDepth(siteConfig, conf, { clobber: true });
|
|
||||||
// assignWithDepth(currentConfig, conf, { clobber: true });
|
|
||||||
|
|
||||||
// Replace current config with siteConfig
|
// Replace current config with siteConfig
|
||||||
directives = [];
|
directives = [];
|
||||||
// console.warn(siteConfig.sequence);
|
|
||||||
updateCurrentConfig(siteConfig, directives);
|
updateCurrentConfig(siteConfig, directives);
|
||||||
};
|
};
|
||||||
|
|
||||||
// const configApi = Object.freeze({
|
|
||||||
// sanitize,
|
|
||||||
// setSiteConfig,
|
|
||||||
// getSiteConfig,
|
|
||||||
// setConfig,
|
|
||||||
// getConfig,
|
|
||||||
// reset,
|
|
||||||
// defaultConfig
|
|
||||||
// });
|
|
||||||
// export default configApi;
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
module.exports = intersectNode;
|
module.exports = intersectNode;
|
||||||
|
|
||||||
function intersectNode(node, point) {
|
function intersectNode(node, point) {
|
||||||
console.info('Intersect Node');
|
// console.info('Intersect Node');
|
||||||
return node.intersect(point);
|
return node.intersect(point);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ function intersectPolygon(node, polyPoints, point) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!intersections.length) {
|
if (!intersections.length) {
|
||||||
console.log('NO INTERSECTION FOUND, RETURN NODE CENTER', node);
|
// console.log('NO INTERSECTION FOUND, RETURN NODE CENTER', node);
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ import utils from './utils';
|
|||||||
*/
|
*/
|
||||||
const init = function() {
|
const init = function() {
|
||||||
const conf = mermaidAPI.getConfig();
|
const conf = mermaidAPI.getConfig();
|
||||||
console.log('Starting rendering diagrams (init) - mermaid.init', conf);
|
// console.log('Starting rendering diagrams (init) - mermaid.init', conf);
|
||||||
let nodes;
|
let nodes;
|
||||||
if (arguments.length >= 2) {
|
if (arguments.length >= 2) {
|
||||||
/*! sequence config was passed as #1 */
|
/*! sequence config was passed as #1 */
|
||||||
|
@ -581,7 +581,7 @@ const mermaidAPI = Object.freeze({
|
|||||||
getSiteConfig: configApi.getSiteConfig,
|
getSiteConfig: configApi.getSiteConfig,
|
||||||
updateSiteConfig: configApi.updateSiteConfig,
|
updateSiteConfig: configApi.updateSiteConfig,
|
||||||
reset: () => {
|
reset: () => {
|
||||||
console.warn('reset');
|
// console.warn('reset');
|
||||||
configApi.reset();
|
configApi.reset();
|
||||||
// const siteConfig = configApi.getSiteConfig();
|
// const siteConfig = configApi.getSiteConfig();
|
||||||
// updateRendererConfigs(siteConfig);
|
// updateRendererConfigs(siteConfig);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user