remove dependency on MUI

This commit is contained in:
Joeri Exelmans 2025-10-24 11:09:21 +02:00
parent 74f4c3bead
commit 3e192f8e26
8 changed files with 72 additions and 44 deletions

View file

@ -13,6 +13,7 @@ export type Connections = {
}
export function detectConnections(state: VisualEditorState): Connections {
const startTime = performance.now();
// detect what is 'connected'
const arrow2SideMap = new Map<string,[{ uid: string; part: RectSide; } | undefined, { uid: string; part: RectSide; } | undefined]>();
const side2ArrowMap = new Map<string, Set<["start"|"end", string]>>();
@ -72,6 +73,11 @@ export function detectConnections(state: VisualEditorState): Connections {
}
}
const endTime = performance.now();
// rather slow, about 10ms for a large model:
// console.debug("connection detection took", endTime-startTime);
return {
arrow2SideMap,
side2ArrowMap,