mirror of
https://github.com/Egonex-AI/Understand-Anything.git
synced 2026-06-22 10:58:03 +08:00
Merge pull request #3 from Lum1104/feature/diff-mode
perf(dashboard): skip diff overlay computation when diffMode is off
This commit is contained in:
@@ -89,10 +89,10 @@ export default function GraphView() {
|
||||
};
|
||||
});
|
||||
|
||||
const diffNodeIds = new Set([...changedNodeIds, ...affectedNodeIds]);
|
||||
const diffNodeIds = diffMode ? new Set([...changedNodeIds, ...affectedNodeIds]) : new Set<string>();
|
||||
const flowEdges: Edge[] = filteredGraphEdges.map((edge, i) => {
|
||||
const sourceInDiff = diffNodeIds.has(edge.source);
|
||||
const targetInDiff = diffNodeIds.has(edge.target);
|
||||
const sourceInDiff = diffMode && diffNodeIds.has(edge.source);
|
||||
const targetInDiff = diffMode && diffNodeIds.has(edge.target);
|
||||
const isImpacted = diffMode && (sourceInDiff || targetInDiff);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user