feat: improve mindmap interaction and enhance performance in JS files

This commit is contained in:
2025-05-03 20:22:59 +01:00
parent c285b7d8dc
commit 7c1533c20d
2 changed files with 154 additions and 3 deletions

View File

@@ -1227,6 +1227,9 @@ class MindMapVisualization {
.style('filter', 'url(#glass-with-reflection)')
.attr('stroke-width', 2);
// Event auslösen: Knoten abgewählt
document.dispatchEvent(new CustomEvent('mindmap-node-deselected'));
// Standardinformationspanels wieder anzeigen
this.showDefaultSidebar();
@@ -1295,6 +1298,11 @@ class MindMapVisualization {
this.nodeElements
.classed('selected', n => n === d);
// Event auslösen: Knoten ausgewählt
document.dispatchEvent(new CustomEvent('mindmap-node-selected', {
detail: d
}));
// Visuelles Feedback für Auswahl
this.nodeElements
.filter(n => n === d)
@@ -1338,9 +1346,6 @@ class MindMapVisualization {
// Knoten zentrieren
this.centerNodeInView(d);
// Knotenbeschreibung in der Seitenleiste anzeigen
this.showNodeDescriptionSidebar(d);
// Gedanken laden
this.loadThoughtsForNode(d);