feat(mindmap): enable node-menu (closes #723)

This commit is contained in:
Elian Doran
2024-12-08 17:07:31 +02:00
parent 12c97c10a1
commit fdcc69591b
5 changed files with 17 additions and 1 deletions

View File

@@ -96,7 +96,11 @@ const I18NEXT = {
const MIND_ELIXIR = {
js: [
"node_modules/mind-elixir/dist/MindElixir.iife.js"
"node_modules/mind-elixir/dist/MindElixir.iife.js",
"node_modules/@mind-elixir/node-menu/dist/node-menu.umd.cjs"
],
css: [
"node_modules/@mind-elixir/node-menu/dist/style.css"
]
};

View File

@@ -76,6 +76,7 @@ export default class MindMapWidget extends TypeWidget {
el: this.$content[0],
direction: MindElixir.LEFT
});
mind.install(window["@mind-elixir/node-menu"]);
this.mind = mind;
mind.init(MindElixir.new());

View File

@@ -102,6 +102,7 @@ function register(app: express.Application) {
app.use(`/${assetPath}/node_modules/codemirror/keymap/`, persistentCacheStatic(path.join(srcRoot, '..', 'node_modules/codemirror/keymap/')));
app.use(`/${assetPath}/node_modules/mind-elixir/dist/`, persistentCacheStatic(path.join(srcRoot, "..", "node_modules/mind-elixir/dist/")));
app.use(`/${assetPath}/node_modules/@mind-elixir/node-menu/dist/`, persistentCacheStatic(path.join(srcRoot, "..", "node_modules/@mind-elixir/node-menu/dist/")));
app.use(`/${assetPath}/node_modules/@highlightjs/cdn-assets/`, persistentCacheStatic(path.join(srcRoot, "..", "node_modules/@highlightjs/cdn-assets/")));
}