mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-21 08:19:43 +02:00
chore: Remove id-cache
This commit is contained in:
@@ -1,16 +0,0 @@
|
|||||||
const idCache = {};
|
|
||||||
|
|
||||||
export const set = (key, val) => {
|
|
||||||
idCache[key] = val;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const get = (k) => idCache[k];
|
|
||||||
export const keys = () => Object.keys(idCache);
|
|
||||||
export const size = () => keys().length;
|
|
||||||
|
|
||||||
export default {
|
|
||||||
get,
|
|
||||||
set,
|
|
||||||
keys,
|
|
||||||
size,
|
|
||||||
};
|
|
@@ -1,5 +1,4 @@
|
|||||||
import { line, curveBasis } from 'd3';
|
import { line, curveBasis } from 'd3';
|
||||||
import idCache from './id-cache.js';
|
|
||||||
import { StateDB } from './stateDb.js';
|
import { StateDB } from './stateDb.js';
|
||||||
import utils from '../../utils.js';
|
import utils from '../../utils.js';
|
||||||
import common from '../common/common.js';
|
import common from '../common/common.js';
|
||||||
@@ -405,8 +404,6 @@ export const drawState = function (elem, stateDef) {
|
|||||||
stateInfo.width = stateBox.width + 2 * getConfig().state.padding;
|
stateInfo.width = stateBox.width + 2 * getConfig().state.padding;
|
||||||
stateInfo.height = stateBox.height + 2 * getConfig().state.padding;
|
stateInfo.height = stateBox.height + 2 * getConfig().state.padding;
|
||||||
|
|
||||||
idCache.set(id, stateInfo);
|
|
||||||
// stateCnt++;
|
|
||||||
return stateInfo;
|
return stateInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user