Removed warnings in the grammar oand some console logging

This commit is contained in:
Knut Sveidqvist
2022-09-07 12:38:26 +02:00
parent c0dd6f9e35
commit c50a7533f6
3 changed files with 69 additions and 61 deletions

View File

@@ -1,6 +1,6 @@
/** Created by knut on 15-01-14. */
import { sanitizeText, getConfig } from '../../diagram-api/diagramAPI';
import { log } from '../../logger';
import { log as _log } from '../../logger';
let nodes = [];
let cnt = 0;
@@ -25,7 +25,7 @@ export const getMindmap = () => {
return nodes.length > 0 ? nodes[0] : null;
};
export const addNode = (level, id, descr, type) => {
console.info('addNode', level, id, descr, type);
log.info('addNode', level, id, descr, type);
const conf = getConfig();
const node = {
id: cnt++,
@@ -132,7 +132,8 @@ export const type2Str = (type) => {
return 'no-border';
}
};
// Expose logger to grammar
export const log = _log;
export const getNodeById = (id) => nodes[id];
export const getElementById = (id) => elements[id];
// export default {