resolve PR comments and update changeset

This commit is contained in:
darshanr0107
2025-07-15 12:19:02 +05:30
parent d3e2be35be
commit 96c21c7e54
2 changed files with 4 additions and 4 deletions

View File

@@ -2,4 +2,4 @@
'mermaid': patch 'mermaid': patch
--- ---
patch: updated mindmapdb to use class based approach patch: Update MindmapDB to use class based approach

View File

@@ -18,7 +18,7 @@ const nodeType = {
export class MindmapDB { export class MindmapDB {
private nodes: MindmapNode[] = []; private nodes: MindmapNode[] = [];
private cnt = 0; private count = 0;
private elements: Record<number, D3Element> = {}; private elements: Record<number, D3Element> = {};
public readonly nodeType: typeof nodeType; public readonly nodeType: typeof nodeType;
@@ -36,7 +36,7 @@ export class MindmapDB {
} }
public clear() { public clear() {
this.nodes = []; this.nodes = [];
this.cnt = 0; this.count = 0;
this.elements = {}; this.elements = {};
} }
@@ -68,7 +68,7 @@ export class MindmapDB {
} }
const node: MindmapNode = { const node: MindmapNode = {
id: this.cnt++, id: this.count++,
nodeId: sanitizeText(id, conf), nodeId: sanitizeText(id, conf),
level, level,
descr: sanitizeText(descr, conf), descr: sanitizeText(descr, conf),