@anlijiu/markmap 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/markmap.js
CHANGED
|
@@ -47090,7 +47090,16 @@ a {
|
|
|
47090
47090
|
|
|
47091
47091
|
// src/markmap-renderer.ts
|
|
47092
47092
|
cytoscape2.use(import_cytoscape_cose_bilkent.default);
|
|
47093
|
+
function assertMindmapNode(node2) {
|
|
47094
|
+
if (!node2 || typeof node2 !== "object" || Array.isArray(node2)) {
|
|
47095
|
+
throw new TypeError(
|
|
47096
|
+
`Expected a MindmapNode object, received ${typeof node2}: ${JSON.stringify(node2)}`
|
|
47097
|
+
);
|
|
47098
|
+
}
|
|
47099
|
+
}
|
|
47100
|
+
__name(assertMindmapNode, "assertMindmapNode");
|
|
47093
47101
|
function drawNodes(svg3, mindmap, opts, section, index = 0) {
|
|
47102
|
+
assertMindmapNode(mindmap);
|
|
47094
47103
|
drawNode(svg3, mindmap, opts, section, index);
|
|
47095
47104
|
if (mindmap.children) {
|
|
47096
47105
|
mindmap.children.forEach((child, index2) => {
|