Feat: Legende oben links und auto-fit bei Suche/Filter im Abhängigkeitsgraph (v1.2.5)
- Legende von unten links nach oben links verschoben, damit vis.js-Navigationspfeile nicht überdeckt werden - network.fit() mit Animation bei jeder Suche und Checkbox-Änderung, sodass alle relevanten Knoten im Viewport sichtbar sind Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -810,7 +810,7 @@ class XslDependencyDialog(QDialog):
|
||||
}}
|
||||
#graph-legend {{
|
||||
position: absolute;
|
||||
bottom: 16px;
|
||||
top: 16px;
|
||||
left: 16px;
|
||||
background: {bg_hex}cc;
|
||||
border: 1px solid #888;
|
||||
@@ -994,7 +994,10 @@ class XslDependencyDialog(QDialog):
|
||||
edges.add(edgesData);
|
||||
allNodes = nodes.get();
|
||||
|
||||
if (!term) return;
|
||||
if (!term) {{
|
||||
network.fit({{ animation: {{ duration: 400, easingFunction: 'easeInOutQuad' }} }});
|
||||
return;
|
||||
}}
|
||||
|
||||
// 1. Matching-Knoten finden
|
||||
var matchedIds = new Set();
|
||||
@@ -1057,6 +1060,7 @@ class XslDependencyDialog(QDialog):
|
||||
}});
|
||||
nodes.update(updates);
|
||||
allNodes = nodes.get();
|
||||
network.fit({{ animation: {{ duration: 400, easingFunction: 'easeInOutQuad' }} }});
|
||||
|
||||
}} else {{
|
||||
// Originalzustand wiederherstellen falls vorher gefiltert
|
||||
@@ -1090,6 +1094,12 @@ class XslDependencyDialog(QDialog):
|
||||
}}
|
||||
}});
|
||||
edges.update(edgeUpdates);
|
||||
|
||||
if (term && matchedIds.size > 0) {{
|
||||
network.fit({{ nodes: Array.from(matchedIds), animation: {{ duration: 400, easingFunction: 'easeInOutQuad' }} }});
|
||||
}} else {{
|
||||
network.fit({{ animation: {{ duration: 400, easingFunction: 'easeInOutQuad' }} }});
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user