From dd866718b98adb82c5e46e49dd93c46a7d7259c4 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Thu, 30 Jul 2020 10:16:29 +0200 Subject: [PATCH] Removed console statements --- src/config.js | 32 ------------------- src/dagre-wrapper/intersect/intersect-node.js | 2 +- .../intersect/intersect-polygon.js | 2 +- src/mermaid.js | 2 +- src/mermaidAPI.js | 2 +- 5 files changed, 4 insertions(+), 36 deletions(-) diff --git a/src/config.js b/src/config.js index 764216af4..a10d75513 100644 --- a/src/config.js +++ b/src/config.js @@ -25,17 +25,11 @@ export const updateCurrentConfig = (siteCfg, _directives) => { } } if (cfg.theme && theme[cfg.theme]) { - // console.warn('cfg beeing updated main bkg', themeVariables, cfg.theme); const variables = theme[cfg.theme].getThemeVariables(themeVariables); - // console.warn('cfg beeing updated 2 main bkg', variables.mainBkg); cfg.themeVariables = variables; } - // else { - // console.warn('cfg not beeing updated main bkg', themeVariables, cfg.theme); - // } currentConfig = cfg; - // console.warn('cfg updated main bkg', cfg.sequence); return cfg; }; /** @@ -53,23 +47,14 @@ export const updateCurrentConfig = (siteCfg, _directives) => { * @returns {*} - the siteConfig */ export const setSiteConfig = conf => { - // siteConfig = { ...defaultConfig, ...conf }; siteConfig = assignWithDepth({}, defaultConfig); siteConfig = assignWithDepth(siteConfig, conf); currentConfig = updateCurrentConfig(siteConfig, directives); return siteConfig; }; 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); - console.log('updateSiteConfig', siteConfig); updateCurrentConfig(siteConfig, directives); - // assignWithDesetpth(currentConfig, conf, { clobber: true }); - // // Set theme variables if user has set the theme option - // assignWithDepth(siteConfig, conf); return siteConfig; }; @@ -164,24 +149,7 @@ export const addDirective = directive => { * @param conf - the base currentConfig to reset to (default: current siteConfig ) */ 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 directives = []; - // console.warn(siteConfig.sequence); updateCurrentConfig(siteConfig, directives); }; - -// const configApi = Object.freeze({ -// sanitize, -// setSiteConfig, -// getSiteConfig, -// setConfig, -// getConfig, -// reset, -// defaultConfig -// }); -// export default configApi; diff --git a/src/dagre-wrapper/intersect/intersect-node.js b/src/dagre-wrapper/intersect/intersect-node.js index 8164f0f59..70255f46a 100644 --- a/src/dagre-wrapper/intersect/intersect-node.js +++ b/src/dagre-wrapper/intersect/intersect-node.js @@ -1,6 +1,6 @@ module.exports = intersectNode; function intersectNode(node, point) { - console.info('Intersect Node'); + // console.info('Intersect Node'); return node.intersect(point); } diff --git a/src/dagre-wrapper/intersect/intersect-polygon.js b/src/dagre-wrapper/intersect/intersect-polygon.js index b40536d38..c505000b8 100644 --- a/src/dagre-wrapper/intersect/intersect-polygon.js +++ b/src/dagre-wrapper/intersect/intersect-polygon.js @@ -44,7 +44,7 @@ function intersectPolygon(node, polyPoints, point) { } if (!intersections.length) { - console.log('NO INTERSECTION FOUND, RETURN NODE CENTER', node); + // console.log('NO INTERSECTION FOUND, RETURN NODE CENTER', node); return node; } diff --git a/src/mermaid.js b/src/mermaid.js index 4f45de49f..552f2557f 100644 --- a/src/mermaid.js +++ b/src/mermaid.js @@ -31,7 +31,7 @@ import utils from './utils'; */ const init = function() { const conf = mermaidAPI.getConfig(); - console.log('Starting rendering diagrams (init) - mermaid.init', conf); + // console.log('Starting rendering diagrams (init) - mermaid.init', conf); let nodes; if (arguments.length >= 2) { /*! sequence config was passed as #1 */ diff --git a/src/mermaidAPI.js b/src/mermaidAPI.js index cf1a35211..977ecc9fa 100644 --- a/src/mermaidAPI.js +++ b/src/mermaidAPI.js @@ -581,7 +581,7 @@ const mermaidAPI = Object.freeze({ getSiteConfig: configApi.getSiteConfig, updateSiteConfig: configApi.updateSiteConfig, reset: () => { - console.warn('reset'); + // console.warn('reset'); configApi.reset(); // const siteConfig = configApi.getSiteConfig(); // updateRendererConfigs(siteConfig);