chore: Remove id-cache

This commit is contained in:
Sidharth Vinod
2025-02-17 00:27:02 +05:30
parent 31984acfe0
commit e89c77a5ca
2 changed files with 0 additions and 19 deletions

View File

@@ -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,
};

View File

@@ -1,5 +1,4 @@
import { line, curveBasis } from 'd3';
import idCache from './id-cache.js';
import { StateDB } from './stateDb.js';
import utils from '../../utils.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.height = stateBox.height + 2 * getConfig().state.padding;
idCache.set(id, stateInfo);
// stateCnt++;
return stateInfo;
};